1
0
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:
Mike Fährmann 2019-10-27 23:16:25 +01:00
parent 03e0cec715
commit d44f790e81
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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()