From a5071c9ca05426b9646e4c750083855a878a089c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Thu, 18 Apr 2024 15:42:53 +0200 Subject: [PATCH] [common] fix NameError in Extractor.request() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … when accessing 'code' after an requests exception was raised. Caused by the changes in 566472f080c675d25a3c0785ce0884029a7cd3a5 --- gallery_dl/extractor/common.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gallery_dl/extractor/common.py b/gallery_dl/extractor/common.py index fe68f5ac..25578536 100644 --- a/gallery_dl/extractor/common.py +++ b/gallery_dl/extractor/common.py @@ -171,6 +171,7 @@ class Extractor(): requests.exceptions.ChunkedEncodingError, requests.exceptions.ContentDecodingError) as exc: msg = exc + code = 0 except (requests.exceptions.RequestException) as exc: raise exception.HttpError(exc) else: