', ' :: '),
+ ("origurl" , 'http://exhentai.org/fullimg.php', '"'),
+ ("gid" , 'var gid=', ';'),
+ ("startkey" , 'var startkey="', '";'),
+ ("showkey" , 'var showkey="', '";'),
))
+ data["imgkey"] = data["startkey"]
if data["origurl"]:
data["origurl"] = "http://exhentai.org/fullimg.php" + text.unescape(data["origurl"])
else:
@@ -112,22 +113,23 @@ class ExhentaiExtractor(Extractor):
"method" : "showpage",
"page" : 2,
"gid" : int(data["gid"]),
- "imgkey" : data["imgkey"],
+ "imgkey" : data["imgkey-next"],
"showkey": data["showkey"],
}
while True:
+ if data["imgkey"] == data["imgkey-next"]:
+ return
time.sleep(random.uniform(3, 6))
page = self.session.post(self.api_url, json=request).json()
- data["imgkey"] , pos = text.extract(page["i3"], "'", "'")
- data["url"] , pos = text.extract(page["i3"], '
', ' :: ')
- data["origurl"], pos = text.extract(page["i7"], '
', ' :: ')
+ data["origurl"] , pos = text.extract(page["i7"], '