From c700cef055748bddfda1f85ac814db3c84b55553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Thu, 9 Oct 2025 12:16:33 +0200 Subject: [PATCH] [zerochan] forward URL parameters to API requests (#8377) --- gallery_dl/extractor/zerochan.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/gallery_dl/extractor/zerochan.py b/gallery_dl/extractor/zerochan.py index 98c93315..7bff83b4 100644 --- a/gallery_dl/extractor/zerochan.py +++ b/gallery_dl/extractor/zerochan.py @@ -23,7 +23,7 @@ class ZerochanExtractor(BooruExtractor): filename_fmt = "{id}.{extension}" archive_fmt = "{id}" page_start = 1 - per_page = 250 + per_page = 200 cookies_domain = ".zerochan.net" cookies_names = ("z_id", "z_hash") useragent = util.USERAGENT @@ -188,10 +188,11 @@ class ZerochanTagExtractor(ZerochanExtractor): def posts_html(self): url = self.root + "/" + self.search_tag - params = text.parse_query(self.query) - params["p"] = text.parse_int(params.get("p"), self.page_start) metadata = self.config("metadata") + params = text.parse_query(self.query, empty=True) + params["p"] = text.parse_int(params.get("p"), self.page_start) + while True: try: page = self.request( @@ -231,11 +232,11 @@ class ZerochanTagExtractor(ZerochanExtractor): def posts_api(self): url = self.root + "/" + self.search_tag metadata = self.config("metadata") - params = { - "json": "1", - "l" : self.per_page, - "p" : self.page_start, - } + + params = text.parse_query(self.query, empty=True) + params["p"] = text.parse_int(params.get("p"), self.page_start) + params.setdefault("l", self.per_page) + params["json"] = "1" while True: try: