mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-25 04:02:32 +01:00
fixed various bugs
- forgot "self." before "name_fmt" - image keys where off by one
This commit is contained in:
parent
deef91eddc
commit
7588974306
@ -33,13 +33,14 @@ class Extractor(BasicExtractor):
|
||||
url , pos = e(text, '<img id="img" src="', '"', pos)
|
||||
name , pos = e(text, '<div id="i4"><div>', ' :: ', pos)
|
||||
orgurl , pos = e(text, 'http://exhentai.org/fullimg.php', '"', pos)
|
||||
if orgurl: url = "http://exhentai.org/fullimg.php" + unescape(orgurl)
|
||||
yield url, name_fmt.format(self.gid, 1, imgkey, name)
|
||||
|
||||
gid , pos = e(text, 'var gid=' , ';', pos)
|
||||
startkey, pos = e(text, 'var startkey="', '";', pos)
|
||||
showkey , pos = e(text, 'var showkey="' , '";', pos)
|
||||
|
||||
#
|
||||
if orgurl: url = "http://exhentai.org/fullimg.php" + unescape(orgurl)
|
||||
yield url, self.name_fmt.format(self.gid, 1, startkey, name)
|
||||
|
||||
# use json-api for further pages
|
||||
request = {
|
||||
"method" : "showpage",
|
||||
@ -60,7 +61,7 @@ class Extractor(BasicExtractor):
|
||||
name , pos = e(info["i" ], '<div>', ' :: ')
|
||||
orgurl, pos = e(info["i7"], '<a href="', '"')
|
||||
if orgurl: url = unescape(orgurl)
|
||||
yield url, name_fmt.format(gid, request["page"], imgkey, name)
|
||||
yield url, self.name_fmt.format(gid, request["page"], request["imgkey"], name)
|
||||
|
||||
if request["imgkey"] == imgkey:
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user