Fix Epikmanga (#4127)
* Fix Epikmanga * Add header selector * Use header selector * Update the illusory build.gradle that somehow keeps managing to evade me
This commit is contained in:
parent
c790896c91
commit
e54e732bac
|
@ -5,7 +5,7 @@ ext {
|
||||||
extName = 'FMReader (multiple aggregators)'
|
extName = 'FMReader (multiple aggregators)'
|
||||||
pkgNameSuffix = 'all.fmreader'
|
pkgNameSuffix = 'all.fmreader'
|
||||||
extClass = '.FMReaderFactory'
|
extClass = '.FMReaderFactory'
|
||||||
extVersionCode = 20
|
extVersionCode = 21
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
containsNsfw = true
|
containsNsfw = true
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,9 +124,11 @@ abstract class FMReader(
|
||||||
|
|
||||||
override fun searchMangaSelector() = popularMangaSelector()
|
override fun searchMangaSelector() = popularMangaSelector()
|
||||||
|
|
||||||
|
open val headerSelector = "h3"
|
||||||
|
|
||||||
override fun popularMangaFromElement(element: Element): SManga {
|
override fun popularMangaFromElement(element: Element): SManga {
|
||||||
return SManga.create().apply {
|
return SManga.create().apply {
|
||||||
element.select("h3 a").let {
|
element.select("$headerSelector a").let {
|
||||||
setUrlWithoutDomain(it.attr("abs:href"))
|
setUrlWithoutDomain(it.attr("abs:href"))
|
||||||
title = it.text()
|
title = it.text()
|
||||||
}
|
}
|
||||||
|
|
|
@ -254,6 +254,9 @@ class EpikManga : FMReader("Epik Manga", "https://www.epikmanga.com", "tr") {
|
||||||
override fun popularMangaRequest(page: Int): Request = GET("$baseUrl/seri-listesi?sorting=views&sorting-type=DESC&Sayfa=$page", headers)
|
override fun popularMangaRequest(page: Int): Request = GET("$baseUrl/seri-listesi?sorting=views&sorting-type=DESC&Sayfa=$page", headers)
|
||||||
override fun latestUpdatesRequest(page: Int): Request = GET("$baseUrl/seri-listesi?sorting=lastUpdate&sorting-type=DESC&Sayfa=$page", headers)
|
override fun latestUpdatesRequest(page: Int): Request = GET("$baseUrl/seri-listesi?sorting=lastUpdate&sorting-type=DESC&Sayfa=$page", headers)
|
||||||
override fun popularMangaNextPageSelector() = "ul.pagination li.active + li:not(.disabled)"
|
override fun popularMangaNextPageSelector() = "ul.pagination li.active + li:not(.disabled)"
|
||||||
|
|
||||||
|
override val headerSelector = "h4"
|
||||||
|
|
||||||
// search wasn't working on source's website
|
// search wasn't working on source's website
|
||||||
override fun fetchSearchManga(page: Int, query: String, filters: FilterList): Observable<MangasPage> {
|
override fun fetchSearchManga(page: Int, query: String, filters: FilterList): Observable<MangasPage> {
|
||||||
return client.newCall(searchMangaRequest(page, query, filters))
|
return client.newCall(searchMangaRequest(page, query, filters))
|
||||||
|
|
Loading…
Reference in New Issue