From 51b16d078b77a35e72f9fe5bc40c2ccfa3e19dcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Mon, 4 Nov 2024 22:22:58 +0100 Subject: [PATCH] [rule34xyz] ensure 'files' keys are strings (#1078) fixes -K/--list-keywords --- gallery_dl/extractor/rule34xyz.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gallery_dl/extractor/rule34xyz.py b/gallery_dl/extractor/rule34xyz.py index b686cf0a..450d2262 100644 --- a/gallery_dl/extractor/rule34xyz.py +++ b/gallery_dl/extractor/rule34xyz.py @@ -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):