From 4220cd42c0cf892d40a1fe8d05aa2b5b803160b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Thu, 2 Oct 2025 09:19:01 +0200 Subject: [PATCH] [nozomi] URL encode search tags (#8328) --- gallery_dl/extractor/nozomi.py | 2 +- test/results/nozomi.py | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gallery_dl/extractor/nozomi.py b/gallery_dl/extractor/nozomi.py index 21c361cd..528aff2e 100644 --- a/gallery_dl/extractor/nozomi.py +++ b/gallery_dl/extractor/nozomi.py @@ -173,7 +173,7 @@ class NozomiSearchExtractor(NozomiExtractor): for tag in self.tags: (negative if tag[0] == "-" else positive).append( - tag.replace("/", "")) + text.quote(tag.replace("/", ""))) for tag in positive: ids = nozomi("nozomi/" + tag) diff --git a/test/results/nozomi.py b/test/results/nozomi.py index 8c2017ec..dfda4eac 100644 --- a/test/results/nozomi.py +++ b/test/results/nozomi.py @@ -108,4 +108,14 @@ __tests__ = ( "#count" : range(5, 10), }, +{ + "#url" : "https://nozomi.la/search.html?q=musume_janakute_mama_ga_sukinano!?", + "#comment" : "404 error due to unquoted '?' in search tag (#8328)", + "#class" : nozomi.NozomiSearchExtractor, + "#range" : "1-3", + "#count" : 3, + + "search_tags": ["musume_janakute_mama_ga_sukinano!?"], +}, + )