[RU]Сhan fix title and no supportsLatest (#11473)
* [RU]Сhan fix title and no supportsLatest * hentai+yaoi
This commit is contained in:
parent
c8c48e8e67
commit
2c73d2c4b0
|
@ -6,7 +6,7 @@ ext {
|
|||
extName = 'Henchan'
|
||||
pkgNameSuffix = 'ru.henchan'
|
||||
extClass = '.Henchan'
|
||||
extVersionCode = 30
|
||||
extVersionCode = 31
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
|
|
|
@ -27,11 +27,11 @@ class Henchan : ParsedHttpSource() {
|
|||
|
||||
override val name = "Henchan"
|
||||
|
||||
override val baseUrl = "https://hentaichan.live"
|
||||
override val baseUrl = "https://x.hentaichan.live"
|
||||
|
||||
override val lang = "ru"
|
||||
|
||||
override val supportsLatest = true
|
||||
override val supportsLatest = false
|
||||
|
||||
private val rateLimitInterceptor = RateLimitInterceptor(2)
|
||||
|
||||
|
@ -41,9 +41,6 @@ class Henchan : ParsedHttpSource() {
|
|||
override fun popularMangaRequest(page: Int): Request =
|
||||
GET("$baseUrl/mostfavorites&sort=manga?offset=${20 * (page - 1)}", headers)
|
||||
|
||||
override fun latestUpdatesRequest(page: Int): Request =
|
||||
GET("$baseUrl/manga/new?offset=${20 * (page - 1)}", headers)
|
||||
|
||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||
|
||||
val url = if (query.isNotEmpty()) {
|
||||
|
@ -86,9 +83,12 @@ class Henchan : ParsedHttpSource() {
|
|||
return GET(url, headers)
|
||||
}
|
||||
|
||||
override fun popularMangaSelector() = ".content_row"
|
||||
override fun popularMangaSelector() = "div.content_row"
|
||||
|
||||
override fun latestUpdatesSelector() = popularMangaSelector()
|
||||
override fun latestUpdatesRequest(page: Int): Request = throw UnsupportedOperationException("Not used")
|
||||
override fun latestUpdatesSelector() = throw UnsupportedOperationException("Not used")
|
||||
override fun latestUpdatesFromElement(element: Element) = throw UnsupportedOperationException("Not used")
|
||||
override fun latestUpdatesNextPageSelector() = throw UnsupportedOperationException("Not used")
|
||||
|
||||
override fun searchMangaSelector() = ".content_row:not(:has(div.item:containsOwn(Тип)))"
|
||||
|
||||
|
@ -103,24 +103,18 @@ class Henchan : ParsedHttpSource() {
|
|||
override fun popularMangaFromElement(element: Element): SManga {
|
||||
val manga = SManga.create()
|
||||
manga.thumbnail_url = element.select("img").first().attr("src").getHQThumbnail()
|
||||
|
||||
val urlElem = element.select("h2 > a").first()
|
||||
manga.setUrlWithoutDomain(urlElem.attr("href"))
|
||||
manga.title = urlElem.attr("title")
|
||||
|
||||
manga.title = element.attr("title")
|
||||
element.select("h2 > a").first().let {
|
||||
manga.setUrlWithoutDomain(it.attr("href"))
|
||||
}
|
||||
return manga
|
||||
}
|
||||
|
||||
override fun latestUpdatesFromElement(element: Element): SManga =
|
||||
popularMangaFromElement(element)
|
||||
|
||||
override fun searchMangaFromElement(element: Element): SManga =
|
||||
popularMangaFromElement(element)
|
||||
|
||||
override fun popularMangaNextPageSelector() = "#pagination > a:contains(Вперед)"
|
||||
|
||||
override fun latestUpdatesNextPageSelector() = popularMangaNextPageSelector()
|
||||
|
||||
override fun searchMangaNextPageSelector() = "#nextlink, ${popularMangaNextPageSelector()}"
|
||||
|
||||
override fun mangaDetailsParse(document: Document): SManga {
|
||||
|
|
|
@ -5,7 +5,7 @@ ext {
|
|||
extName = 'Mangachan'
|
||||
pkgNameSuffix = 'ru.mangachan'
|
||||
extClass = '.Mangachan'
|
||||
extVersionCode = 11
|
||||
extVersionCode = 12
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -28,7 +28,7 @@ class Mangachan : ParsedHttpSource() {
|
|||
|
||||
override val lang = "ru"
|
||||
|
||||
override val supportsLatest = true
|
||||
override val supportsLatest = false
|
||||
|
||||
private val rateLimitInterceptor = RateLimitInterceptor(2)
|
||||
|
||||
|
@ -109,29 +109,21 @@ class Mangachan : ParsedHttpSource() {
|
|||
return GET(url, headers)
|
||||
}
|
||||
|
||||
override fun latestUpdatesRequest(page: Int): Request = GET("$baseUrl/newestch?page=$page")
|
||||
override fun latestUpdatesRequest(page: Int): Request = throw UnsupportedOperationException("Not used")
|
||||
override fun latestUpdatesSelector() = throw UnsupportedOperationException("Not used")
|
||||
override fun latestUpdatesFromElement(element: Element) = throw UnsupportedOperationException("Not used")
|
||||
override fun latestUpdatesNextPageSelector() = throw UnsupportedOperationException("Not used")
|
||||
|
||||
override fun popularMangaSelector() = "div.content_row"
|
||||
|
||||
override fun latestUpdatesSelector() = "ul.area_rightNews li"
|
||||
|
||||
override fun searchMangaSelector() = popularMangaSelector()
|
||||
|
||||
override fun popularMangaFromElement(element: Element): SManga {
|
||||
val manga = SManga.create()
|
||||
manga.thumbnail_url = element.select("div.manga_images img").first().attr("src")
|
||||
manga.title = element.attr("title")
|
||||
element.select("h2 > a").first().let {
|
||||
manga.setUrlWithoutDomain(it.attr("href"))
|
||||
manga.title = it.attr("title")
|
||||
}
|
||||
return manga
|
||||
}
|
||||
|
||||
override fun latestUpdatesFromElement(element: Element): SManga {
|
||||
val manga = SManga.create()
|
||||
element.select("a:nth-child(1)").first().let {
|
||||
manga.setUrlWithoutDomain(it.attr("href"))
|
||||
manga.title = it.attr("title")
|
||||
}
|
||||
return manga
|
||||
}
|
||||
|
@ -140,8 +132,6 @@ class Mangachan : ParsedHttpSource() {
|
|||
|
||||
override fun popularMangaNextPageSelector() = "a:contains(Вперед)"
|
||||
|
||||
override fun latestUpdatesNextPageSelector() = popularMangaNextPageSelector()
|
||||
|
||||
override fun searchMangaNextPageSelector() = "a:contains(Далее)"
|
||||
|
||||
private fun searchGenresNextPageSelector() = popularMangaNextPageSelector()
|
||||
|
|
|
@ -5,7 +5,7 @@ ext {
|
|||
extName = 'Yaoichan'
|
||||
pkgNameSuffix = 'ru.yaoichan'
|
||||
extClass = '.Yaoichan'
|
||||
extVersionCode = 2
|
||||
extVersionCode = 3
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ class Yaoichan : ParsedHttpSource() {
|
|||
|
||||
override val lang = "ru"
|
||||
|
||||
override val supportsLatest = true
|
||||
override val supportsLatest = false
|
||||
|
||||
private val rateLimitInterceptor = RateLimitInterceptor(2)
|
||||
|
||||
|
@ -34,9 +34,6 @@ class Yaoichan : ParsedHttpSource() {
|
|||
override fun popularMangaRequest(page: Int): Request =
|
||||
GET("$baseUrl/mostfavorites?offset=${20 * (page - 1)}", headers)
|
||||
|
||||
override fun latestUpdatesRequest(page: Int): Request =
|
||||
GET("$baseUrl/manga/new?offset=${20 * (page - 1)}", headers)
|
||||
|
||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||
val url = if (query.isNotEmpty()) {
|
||||
"$baseUrl/?do=search&subaction=search&story=$query&search_start=$page"
|
||||
|
@ -105,28 +102,27 @@ class Yaoichan : ParsedHttpSource() {
|
|||
|
||||
override fun popularMangaSelector() = "div.content_row"
|
||||
|
||||
override fun latestUpdatesSelector() = popularMangaSelector()
|
||||
|
||||
override fun searchMangaSelector() = popularMangaSelector()
|
||||
|
||||
override fun popularMangaFromElement(element: Element): SManga {
|
||||
val manga = SManga.create()
|
||||
manga.thumbnail_url = element.select("div.manga_images img").first().attr("src")
|
||||
manga.title = element.attr("title")
|
||||
element.select("h2 > a").first().let {
|
||||
manga.setUrlWithoutDomain(it.attr("href"))
|
||||
manga.title = it.attr("title")
|
||||
}
|
||||
return manga
|
||||
}
|
||||
|
||||
override fun latestUpdatesFromElement(element: Element): SManga = popularMangaFromElement(element)
|
||||
override fun latestUpdatesRequest(page: Int): Request = throw UnsupportedOperationException("Not used")
|
||||
override fun latestUpdatesSelector() = throw UnsupportedOperationException("Not used")
|
||||
override fun latestUpdatesFromElement(element: Element) = throw UnsupportedOperationException("Not used")
|
||||
override fun latestUpdatesNextPageSelector() = throw UnsupportedOperationException("Not used")
|
||||
|
||||
override fun searchMangaFromElement(element: Element): SManga = popularMangaFromElement(element)
|
||||
|
||||
override fun popularMangaNextPageSelector() = "a:contains(Вперед)"
|
||||
|
||||
override fun latestUpdatesNextPageSelector() = popularMangaNextPageSelector()
|
||||
|
||||
override fun searchMangaNextPageSelector() = "a:contains(Далее), ${popularMangaNextPageSelector()}"
|
||||
|
||||
override fun mangaDetailsParse(document: Document): SManga {
|
||||
|
|
Loading…
Reference in New Issue