BlogTruyen - fix search (#2569)

This commit is contained in:
Mike 2020-04-01 22:41:00 -04:00 committed by GitHub
parent b0255f9325
commit 611f8c6240
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: BlogTruyen'
pkgNameSuffix = 'vi.blogtruyen'
extClass = '.BlogTruyen'
extVersionCode = 7
extVersionCode = 8
libVersion = '1.2'
}

View File

@ -116,10 +116,16 @@ class BlogTruyen : ParsedHttpSource() {
return GET(url.toString().replace("m.", ""), headers)
}
override fun searchMangaSelector() = "div.list > p:gt(0) > span:eq(0)"
override fun searchMangaSelector() = "div.list > p:has(a)"
override fun searchMangaFromElement(element: Element): SManga {
return popularMangaFromElement(element)
return SManga.create().apply {
element.select("a").let {
setUrlWithoutDomain(it.attr("href"))
title = it.text()
}
thumbnail_url = element.nextElementSibling().select("img").attr("abs:src")
}
}
override fun searchMangaNextPageSelector() = "ul.pagination i.glyphicon.glyphicon-step-forward.red"