Fix/revert to img (#8648)
* TeamX: revert page image extraction to use <img> instead of <canvas> * TeamX: support both <img> and <canvas> for page extraction
This commit is contained in:
parent
312747fb1a
commit
c9d562c63a
src/ar/teamx
@ -1,7 +1,7 @@
|
|||||||
ext {
|
ext {
|
||||||
extName = 'Team X'
|
extName = 'Team X'
|
||||||
extClass = '.TeamX'
|
extClass = '.TeamX'
|
||||||
extVersionCode = 21
|
extVersionCode = 22
|
||||||
isNsfw = false
|
isNsfw = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,9 +215,14 @@ class TeamX : ParsedHttpSource(), ConfigurableSource {
|
|||||||
// Pages
|
// Pages
|
||||||
|
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
return document.select("div.image_list canvas[data-src]").mapIndexed { i, img ->
|
return document.select("div.image_list canvas[data-src], div.image_list img[src]")
|
||||||
Page(i, "", img.absUrl("data-src"))
|
.mapIndexed { i, element ->
|
||||||
}
|
val url = when {
|
||||||
|
element.hasAttr("src") -> element.absUrl("src")
|
||||||
|
else -> element.absUrl("data-src")
|
||||||
|
}
|
||||||
|
Page(i, "", url)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException()
|
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user