1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-21 18:22:30 +01:00

[common] allow request() to accept all HTTP status codes

by passing Ellipsis/... as 'fatal' argument
This commit is contained in:
Mike Fährmann 2024-10-11 19:17:24 +02:00
parent 1df09292b5
commit 6d8d882dbf
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -185,7 +185,9 @@ class Extractor():
self._dump_response(response)
if (
code < 400 or
code < 500 and (not fatal and code != 429 or fatal is None)
code < 500 and (
not fatal and code != 429 or fatal is None) or
fatal is ...
):
if encoding:
response.encoding = encoding