mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 18:53:21 +01:00
[imagefap] fix single image resolution
Downloading from a single image page like https://www.imagefap.com/photo/123456789/ returned only the thumbnail URL.
This commit is contained in:
parent
311ec1d9ef
commit
d119507037
@ -126,14 +126,15 @@ class ImagefapImageExtractor(ImagefapExtractor):
|
||||
url = "{}/photo/{}/".format(self.root, self.image_id)
|
||||
page = self.request(url).text
|
||||
|
||||
url, pos = text.extract(
|
||||
page, 'original="', '"')
|
||||
info, pos = text.extract(
|
||||
page, '<script type="application/ld+json">', '</script>')
|
||||
page, '<script type="application/ld+json">', '</script>', pos)
|
||||
image_id, pos = text.extract(
|
||||
page, 'id="imageid_input" value="', '"', pos)
|
||||
gallery_id, pos = text.extract(
|
||||
page, 'id="galleryid_input" value="', '"', pos)
|
||||
info = util.json_loads(info)
|
||||
url = info["contentUrl"]
|
||||
|
||||
return url, text.nameext_from_url(url, {
|
||||
"title": text.unescape(info["name"]),
|
||||
|
Loading…
Reference in New Issue
Block a user