Fix pages not loading at YaoiToshokan (#3877)
Fix pages not loading at YaoiToshokan
This commit is contained in:
parent
4f46c13e95
commit
31e72707bb
|
@ -5,7 +5,7 @@ ext {
|
|||
extName = 'Madara (multiple sources)'
|
||||
pkgNameSuffix = "all.madara"
|
||||
extClass = '.MadaraFactory'
|
||||
extVersionCode = 121
|
||||
extVersionCode = 122
|
||||
libVersion = '1.2'
|
||||
}
|
||||
|
||||
|
|
|
@ -682,16 +682,22 @@ class TeabeerComics : Madara("Teabeer Comics", "https://teabeercomics.com", "en"
|
|||
|
||||
class KingzManga : Madara("KingzManga", "https://kingzmanga.com", "ar")
|
||||
|
||||
class YaoiToshokan : Madara("Yaoi Toshokan", "https://www.yaoitoshokan.com.br", "pt-BR") {
|
||||
override val popularMangaUrlSelector = "div.post-title a:not([target])" // Page has custom link to scan website
|
||||
override fun chapterListParse(response: Response): List<SChapter> { // Chapters are listed old to new
|
||||
class YaoiToshokan : Madara("Yaoi Toshokan", "https://yaoitoshokan.com.br", "pt-BR", SimpleDateFormat("dd MMM yyyy", Locale("pt", "BR"))) {
|
||||
// Page has custom link to scan website.
|
||||
override val popularMangaUrlSelector = "div.post-title a:not([target])"
|
||||
|
||||
// Chapters are listed old to new.
|
||||
override fun chapterListParse(response: Response): List<SChapter> {
|
||||
return super.chapterListParse(response).reversed()
|
||||
}
|
||||
|
||||
override fun pageListParse(document: Document): List<Page> {
|
||||
return document.select(pageListParseSelector).mapIndexed { index, element ->
|
||||
Page(index, "", element.select("img").attr("data-src").trim()) // had to add trim because of white space in source
|
||||
}
|
||||
return document.select(pageListParseSelector)
|
||||
.mapIndexed { index, element ->
|
||||
// Had to add trim because of white space in source.
|
||||
val imageUrl = element.select("img").attr("data-src").trim()
|
||||
Page(index, document.location(), imageUrl)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue