diff options
| author | 2024-08-12 02:42:36 -0400 | |
|---|---|---|
| committer | 2024-08-12 02:42:36 -0400 | |
| commit | b5e56c51e491b41f9eb6a895459c185788a377e5 (patch) | |
| tree | f933c7df043d8949e0dc39b560ab534a5d0dc60f /gallery_dl/extractor/zerochan.py | |
| parent | 032e5bed275a253e122ed9ac86dac7b8c4204172 (diff) | |
New upstream version 1.27.3.upstream/1.27.3
Diffstat (limited to 'gallery_dl/extractor/zerochan.py')
| -rw-r--r-- | gallery_dl/extractor/zerochan.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gallery_dl/extractor/zerochan.py b/gallery_dl/extractor/zerochan.py index 126ef49..f9b1a7f 100644 --- a/gallery_dl/extractor/zerochan.py +++ b/gallery_dl/extractor/zerochan.py @@ -198,11 +198,15 @@ class ZerochanTagExtractor(ZerochanExtractor): while True: response = self.request(url, params=params, allow_redirects=False) + if response.status_code >= 300: url = text.urljoin(self.root, response.headers["location"]) - response = self.request(url, params=params) - data = response.json() + self.log.warning("HTTP redirect to %s", url) + if self.config("redirects"): + continue + raise exception.StopExtraction() + data = response.json() try: posts = data["items"] except Exception: |
