mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 10:42:34 +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
@ -28,18 +28,19 @@ class Extractor(BasicExtractor):
|
|||||||
text = self.request(url).text
|
text = self.request(url).text
|
||||||
|
|
||||||
# extract information
|
# extract information
|
||||||
_ , pos = e(text, '<div id="i3"><a onclick="return load_image(', '')
|
_ , pos = e(text, '<div id="i3"><a onclick="return load_image(', '')
|
||||||
imgkey, pos = e(text, "'", "'", pos)
|
imgkey , pos = e(text, "'", "'", pos)
|
||||||
url , pos = e(text, '<img id="img" src="', '"', pos)
|
url , pos = e(text, '<img id="img" src="', '"', pos)
|
||||||
name , pos = e(text, '<div id="i4"><div>', ' :: ', pos)
|
name , pos = e(text, '<div id="i4"><div>', ' :: ', pos)
|
||||||
orgurl, pos = e(text, 'http://exhentai.org/fullimg.php', '"', 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)
|
gid , pos = e(text, 'var gid=' , ';', pos)
|
||||||
startkey, pos = e(text, 'var startkey="', '";', pos)
|
startkey, pos = e(text, 'var startkey="', '";', pos)
|
||||||
showkey , pos = e(text, 'var showkey="' , '";', 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
|
# use json-api for further pages
|
||||||
request = {
|
request = {
|
||||||
"method" : "showpage",
|
"method" : "showpage",
|
||||||
@ -60,7 +61,7 @@ class Extractor(BasicExtractor):
|
|||||||
name , pos = e(info["i" ], '<div>', ' :: ')
|
name , pos = e(info["i" ], '<div>', ' :: ')
|
||||||
orgurl, pos = e(info["i7"], '<a href="', '"')
|
orgurl, pos = e(info["i7"], '<a href="', '"')
|
||||||
if orgurl: url = unescape(orgurl)
|
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:
|
if request["imgkey"] == imgkey:
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user