When a download fails, include filename in output.

This commit is contained in:
anonusr 2022-03-26 14:43:55 -07:00
parent 0eff94d29a
commit 6e109e6d00

View file

@ -81,7 +81,7 @@ page_num = args.start
def download_file(url, fname, desc):
r = session.get(url, stream=True)
if r.status_code != 200:
print("Got a HTTP {} while downloading; skipping".format(r.status_code))
print("Got a HTTP {} while downloading {}; skipping".format(r.status_code, fname))
return False
total = int(r.headers.get('Content-Length', 0))