Handle page quota
This commit is contained in:
parent
d28670a24c
commit
fda392a4d5
@ -415,13 +415,6 @@ class EHentai(
|
||||
Page(i, s)
|
||||
}
|
||||
}!!
|
||||
.doOnNext { pages ->
|
||||
if (pages.any { it.url == "https://$domain/img/509.gif" }) {
|
||||
throw Exception(
|
||||
"Hit page limit",
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private fun fetchChapterPage(
|
||||
chapter: SChapter,
|
||||
@ -769,6 +762,9 @@ class EHentai(
|
||||
select("#loadfail").attr("onclick").nullIfBlank()?.let {
|
||||
page.url = addParam(page.url, "nl", it.substring(it.indexOf('\'') + 1 until it.lastIndexOf('\'')))
|
||||
}
|
||||
if (currentImage == "https://ehgt.org/g/509.gif") {
|
||||
throw Exception("Exceeded page quota")
|
||||
}
|
||||
return currentImage
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user