Albirew/tachiyomi
Archivé
1
0
Bifurcation 0

Add support for latest updates to Readmangatoday (#512)

Cette révision appartient à :
Naji Astier 2016-11-03 16:17:37 +01:00 révisé par inorichi
Parent dcbd72e64d
révision 27d3daf918

Voir le fichier

@ -25,7 +25,7 @@ class Readmangatoday(override val id: Int) : ParsedOnlineSource() {
override val lang: Language get() = EN
override val supportsLatest = false
override val supportsLatest = true
override val client: OkHttpClient get() = network.cloudflareClient
@ -39,8 +39,12 @@ class Readmangatoday(override val id: Int) : ParsedOnlineSource() {
override fun popularMangaInitialUrl() = "$baseUrl/hot-manga/"
override fun latestUpdatesInitialUrl() = "$baseUrl/latest-releases/"
override fun popularMangaSelector() = "div.hot-manga > div.style-list > div.box"
override fun latestUpdatesSelector() = "div.hot-manga > div.style-grid > div.box"
override fun popularMangaFromElement(element: Element, manga: Manga) {
element.select("div.title > h2 > a").first().let {
manga.setUrlWithoutDomain(it.attr("href"))
@ -48,8 +52,14 @@ class Readmangatoday(override val id: Int) : ParsedOnlineSource() {
}
}
override fun latestUpdatesFromElement(element: Element, manga: Manga) {
popularMangaFromElement(element, manga)
}
override fun popularMangaNextPageSelector() = "div.hot-manga > ul.pagination > li > a:contains(»)"
override fun latestUpdatesNextPageSelector(): String = "div.hot-manga > ul.pagination > li > a:contains(»)"
override fun searchMangaInitialUrl(query: String, filters: List<Filter>) =
"$baseUrl/service/advanced_search"
@ -183,21 +193,4 @@ class Readmangatoday(override val id: Int) : ParsedOnlineSource() {
Filter("36", "Yaoi"),
Filter("37", "Yuri")
)
override fun latestUpdatesInitialUrl(): String {
throw UnsupportedOperationException("not implemented")
}
override fun latestUpdatesNextPageSelector(): String {
throw UnsupportedOperationException("not implemented")
}
override fun latestUpdatesFromElement(element: Element, manga: Manga) {
throw UnsupportedOperationException("not implemented")
}
override fun latestUpdatesSelector(): String {
throw UnsupportedOperationException("not implemented")
}
}