Add referer to readmanga/mintmanga requests header (#160)
This commit is contained in:
parent
7b2072e4df
commit
62685514b9
|
@ -5,7 +5,7 @@ ext {
|
||||||
appName = 'Tachiyomi: Mintmanga'
|
appName = 'Tachiyomi: Mintmanga'
|
||||||
pkgNameSuffix = "ru.mintmanga"
|
pkgNameSuffix = "ru.mintmanga"
|
||||||
extClass = '.Mintmanga'
|
extClass = '.Mintmanga'
|
||||||
extVersionCode = 3
|
extVersionCode = 4
|
||||||
extVersionSuffix = 0
|
extVersionSuffix = 0
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package eu.kanade.tachiyomi.extension.ru.mintmanga
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.source.model.*
|
import eu.kanade.tachiyomi.source.model.*
|
||||||
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||||
|
import okhttp3.Headers
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
|
@ -23,6 +24,11 @@ class Mintmanga : ParsedHttpSource() {
|
||||||
|
|
||||||
override val supportsLatest = true
|
override val supportsLatest = true
|
||||||
|
|
||||||
|
override fun headersBuilder() = Headers.Builder().apply {
|
||||||
|
add("User-Agent", "Mozilla/5.0 (Windows NT 6.3; WOW64)")
|
||||||
|
add("Referer", baseUrl)
|
||||||
|
}
|
||||||
|
|
||||||
override fun popularMangaRequest(page: Int): Request =
|
override fun popularMangaRequest(page: Int): Request =
|
||||||
GET("$baseUrl/list?sortType=rate&offset=${70 * (page - 1)}&max=70", headers)
|
GET("$baseUrl/list?sortType=rate&offset=${70 * (page - 1)}&max=70", headers)
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ ext {
|
||||||
appName = 'Tachiyomi: Readmanga'
|
appName = 'Tachiyomi: Readmanga'
|
||||||
pkgNameSuffix = "ru.readmanga"
|
pkgNameSuffix = "ru.readmanga"
|
||||||
extClass = '.Readmanga'
|
extClass = '.Readmanga'
|
||||||
extVersionCode = 3
|
extVersionCode = 4
|
||||||
extVersionSuffix = 0
|
extVersionSuffix = 0
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package eu.kanade.tachiyomi.extension.ru.readmanga
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.source.model.*
|
import eu.kanade.tachiyomi.source.model.*
|
||||||
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||||
|
import okhttp3.Headers
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
|
@ -27,6 +28,11 @@ class Readmanga : ParsedHttpSource() {
|
||||||
|
|
||||||
override fun latestUpdatesSelector() = "div.desc"
|
override fun latestUpdatesSelector() = "div.desc"
|
||||||
|
|
||||||
|
override fun headersBuilder() = Headers.Builder().apply {
|
||||||
|
add("User-Agent", "Mozilla/5.0 (Windows NT 6.3; WOW64)")
|
||||||
|
add("Referer", baseUrl)
|
||||||
|
}
|
||||||
|
|
||||||
override fun popularMangaRequest(page: Int): Request =
|
override fun popularMangaRequest(page: Int): Request =
|
||||||
GET("$baseUrl/list?sortType=rate&offset=${70 * (page - 1)}&max=70", headers)
|
GET("$baseUrl/list?sortType=rate&offset=${70 * (page - 1)}&max=70", headers)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue