mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-26 12:42:29 +01:00
[common] simplify 'status_code' check in Extractor.request()
This commit is contained in:
parent
68f4208251
commit
923c6f3214
@ -177,9 +177,10 @@ class Extractor():
|
||||
code = response.status_code
|
||||
if self._write_pages:
|
||||
self._dump_response(response)
|
||||
if 200 <= code < 400 or fatal is None and \
|
||||
(400 <= code < 500) or not fatal and \
|
||||
(400 <= code < 429 or 431 <= code < 500):
|
||||
if (
|
||||
code < 400 or
|
||||
code < 500 and (not fatal and code != 429 or fatal is None)
|
||||
):
|
||||
if encoding:
|
||||
response.encoding = encoding
|
||||
return response
|
||||
|
Loading…
Reference in New Issue
Block a user