Dm5: Fix image not loading (#1795)
This commit is contained in:
parent
0594d08440
commit
488adf9ba6
|
@ -1,7 +1,7 @@
|
|||
ext {
|
||||
extName = 'Dm5'
|
||||
extClass = '.Dm5'
|
||||
extVersionCode = 1
|
||||
extVersionCode = 2
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
|
|
|
@ -185,12 +185,7 @@ class Dm5 : ParsedHttpSource(), ConfigurableSource {
|
|||
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException()
|
||||
|
||||
override fun imageRequest(page: Page): Request {
|
||||
if (!page.imageUrl!!.contains("pagerdata.ashx")) {
|
||||
return GET(page.imageUrl!!, headers)
|
||||
}
|
||||
|
||||
val referer = page.imageUrl!!.substringBefore("pagerdata.ashx")
|
||||
val header = headers.newBuilder().add("Referer", referer).build()
|
||||
val header = headers.newBuilder().add("Referer", baseUrl).build()
|
||||
return GET(page.imageUrl!!, header)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue