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'
pkgNameSuffix = 'en.tapastic'
extClass = '.Tapastic'
extVersionCode = 19
extVersionCode = 20
isNsfw = true
}

View File

@ -155,7 +155,7 @@ class Tapastic : ConfigurableSource, ParsedHttpSource() {
// Popular
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 popularMangaSelector() = "li.js-list-item"
@ -199,7 +199,7 @@ class Tapastic : ConfigurableSource, ParsedHttpSource() {
// Latest
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 latestUpdatesSelector(): String = popularMangaSelector()
@ -244,7 +244,7 @@ class Tapastic : ConfigurableSource, ParsedHttpSource() {
}
// Append page number
url.addQueryParameter("pageNumber", page.toString())
return GET(url.toString())
return GET(url.toString(), headers)
}
override fun searchMangaNextPageSelector() =