mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-25 20:22:36 +01:00
adjust output for HTTP status related errors
This commit is contained in:
parent
03e0cec715
commit
d44f790e81
@ -107,7 +107,7 @@ class HttpDownloader(DownloaderBase):
|
||||
elif code == 416 and filesize: # Requested Range Not Satisfiable
|
||||
break
|
||||
else:
|
||||
msg = "{}: {} for url: {}".format(code, response.reason, url)
|
||||
msg = "'{} {}' for '{}'".format(code, response.reason, url)
|
||||
if code == 429 or 500 <= code < 600: # Server Error
|
||||
continue
|
||||
self.log.warning("%s", msg)
|
||||
|
@ -111,7 +111,7 @@ class Extractor():
|
||||
msg = ""
|
||||
self.log.warning("Cloudflare CAPTCHA" + msg)
|
||||
|
||||
msg = "{}: {} for url: {}".format(code, response.reason, url)
|
||||
msg = "'{} {}' for '{}'".format(code, response.reason, url)
|
||||
if code < 500 and code != 429 and code != 430:
|
||||
break
|
||||
|
||||
@ -142,7 +142,7 @@ class Extractor():
|
||||
return username, password
|
||||
|
||||
def _init_headers(self):
|
||||
"""Set additional headers for the 'session' object"""
|
||||
"""Initialize HTTP headers for the 'session' object"""
|
||||
headers = self.session.headers
|
||||
headers.clear()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user