1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 02:32:33 +01:00

[pixiv][danbooru] set '_ugoira_original' for ugoira results

This commit is contained in:
Mike Fährmann 2024-10-11 13:19:45 +02:00
parent 5dd17910d1
commit f8bb0fd6cb
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 3 additions and 0 deletions

View File

@ -93,6 +93,7 @@ class DanbooruExtractor(BaseExtractor):
if post["extension"] == "zip":
if self.ugoira:
post["_ugoira_original"] = False
post["_ugoira_frame_data"] = post["frames"] = \
self._ugoira_frames(post)
post["_http_adjust_extension"] = False

View File

@ -150,6 +150,7 @@ class PixivExtractor(Extractor):
work["_http_adjust_extension"] = False
if self.load_ugoira == "original":
work["_ugoira_original"] = True
base, sep, _ = url.rpartition("_ugoira")
base = base.replace("/img-zip-ugoira/", "/img-original/", 1) + sep
@ -173,6 +174,7 @@ class PixivExtractor(Extractor):
for num in range(len(frames))
]
else:
work["_ugoira_original"] = False
url = url.replace("_ugoira600x600", "_ugoira1920x1080", 1)
return ({"url": url},)