From 481bf1e393bc3c57512a755867d5351f771e087b Mon Sep 17 00:00:00 2001 From: PrivateAccount85642650 Date: Fri, 24 Oct 2025 11:33:29 +0200 Subject: [PATCH] [realbooru] fix 'tags' for video posts (#8455) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix realbooru tags for video posts * fix lines too long * combine 'tags' and 'tags_' extraction - extract tag categories independent of 'tags' option * add 'video' & 'animated GIF' tests --------- Co-authored-by: Mike Fährmann --- gallery_dl/extractor/realbooru.py | 26 +++++++------- test/results/realbooru.py | 57 +++++++++++++++++++++++++++++-- 2 files changed, 68 insertions(+), 15 deletions(-) diff --git a/gallery_dl/extractor/realbooru.py b/gallery_dl/extractor/realbooru.py index 7db3986a..a4ce384f 100644 --- a/gallery_dl/extractor/realbooru.py +++ b/gallery_dl/extractor/realbooru.py @@ -28,18 +28,30 @@ class RealbooruExtractor(booru.BooruExtractor): extr('class="container"', '>') post = { - "_html" : page, "id" : post_id, "rating" : "e" if rating == "adult" else (rating or "?")[0], - "tags" : text.unescape(extr(' alt="', '"')), "file_url" : extr('src="', '"'), "created_at": extr(">Posted at ", " by "), "uploader" : extr(">", "<"), "score" : extr('">', "<"), + "tags" : extr('
', ""), "title" : extr('id="title" style="width: 100%;" value="', '"'), "source" : extr('d="source" style="width: 100%;" value="', '"'), } + tags_container = post["tags"] + tags = [] + tags_categories = collections.defaultdict(list) + pattern = text.re(r'') - tags = collections.defaultdict(list) - pattern = text.re(r'