1
0
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:
Mike Fährmann 2023-11-26 00:30:52 +01:00
parent 311ec1d9ef
commit d119507037
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -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"]),