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

[rule34xyz] ensure 'files' keys are strings (#1078)

fixes -K/--list-keywords
This commit is contained in:
Mike Fährmann 2024-11-04 22:22:58 +01:00
parent cf0817e17b
commit 51b16d078b
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -31,11 +31,15 @@ class Rule34xyzExtractor(BooruExtractor):
def _file_url(self, post):
post["files"] = files = {
link["type"]: link["url"]
str(link["type"]): link["url"]
for link in post.pop("imageLinks")
}
post["file_url"] = url = (
files.get(10) or files.get(40) or files.get(41) or files[2])
files.get("10") or # mov
files.get("40") or # mov720
files.get("41") or # mov480
files["2"] # pic
)
return url
def _prepare(self, post):