Fix link image (#1111)

Fix link image
This commit is contained in:
Le Cong Hau 2019-05-16 02:35:46 +07:00 committed by Eugene
parent 8ed0f0728a
commit bcc095bf51
2 changed files with 3 additions and 2 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: NetTruyen' appName = 'Tachiyomi: NetTruyen'
pkgNameSuffix = 'vi.nettruyen' pkgNameSuffix = 'vi.nettruyen'
extClass = '.NetTruyen' extClass = '.NetTruyen'
extVersionCode = 3 extVersionCode = 4
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -156,7 +156,8 @@ class NetTruyen : ParsedHttpSource() {
override fun pageListParse(document: Document): List<Page> { override fun pageListParse(document: Document): List<Page> {
val pages = mutableListOf<Page>() val pages = mutableListOf<Page>()
document.select(".page-chapter img").forEach { document.select(".page-chapter img").forEach {
pages.add(Page(pages.size, "", it.attr("data-original"))) val imageUrl = it.attr("data-original")
pages.add(Page(pages.size, "", if(imageUrl.startsWith("//")) "http:$imageUrl" else imageUrl ))
} }
return pages return pages
} }