Tapas: set User-Agent properly (#17972)

This commit is contained in:
Vetle Ledaal 2023-09-16 15:39:01 +00:00 committed by GitHub
parent 4a198a16e5
commit 32a34ab1a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -6,7 +6,7 @@ ext {
extName = 'Tapas' extName = 'Tapas'
pkgNameSuffix = 'en.tapastic' pkgNameSuffix = 'en.tapastic'
extClass = '.Tapastic' extClass = '.Tapastic'
extVersionCode = 19 extVersionCode = 20
isNsfw = true isNsfw = true
} }

View File

@ -155,7 +155,7 @@ class Tapastic : ConfigurableSource, ParsedHttpSource() {
// Popular // Popular
override fun popularMangaRequest(page: Int): Request = override fun popularMangaRequest(page: Int): Request =
GET("$baseUrl/comics?b=POPULAR&g=0&f=NONE&pageNumber=$page&pageSize=20&") GET("$baseUrl/comics?b=POPULAR&g=0&f=NONE&pageNumber=$page&pageSize=20&", headers)
override fun popularMangaNextPageSelector() = "div[data-has-next=true]" override fun popularMangaNextPageSelector() = "div[data-has-next=true]"
override fun popularMangaSelector() = "li.js-list-item" override fun popularMangaSelector() = "li.js-list-item"
@ -199,7 +199,7 @@ class Tapastic : ConfigurableSource, ParsedHttpSource() {
// Latest // Latest
override fun latestUpdatesRequest(page: Int): Request = override fun latestUpdatesRequest(page: Int): Request =
GET("$baseUrl/comics?b=FRESH&g=0&f=NONE&pageNumber=$page&pageSize=20&") GET("$baseUrl/comics?b=FRESH&g=0&f=NONE&pageNumber=$page&pageSize=20&", headers)
override fun latestUpdatesNextPageSelector(): String = popularMangaNextPageSelector() override fun latestUpdatesNextPageSelector(): String = popularMangaNextPageSelector()
override fun latestUpdatesSelector(): String = popularMangaSelector() override fun latestUpdatesSelector(): String = popularMangaSelector()
@ -244,7 +244,7 @@ class Tapastic : ConfigurableSource, ParsedHttpSource() {
} }
// Append page number // Append page number
url.addQueryParameter("pageNumber", page.toString()) url.addQueryParameter("pageNumber", page.toString())
return GET(url.toString()) return GET(url.toString(), headers)
} }
override fun searchMangaNextPageSelector() = override fun searchMangaNextPageSelector() =