Show which url fails to request.

This commit is contained in:
gfw-report 2022-03-26 05:18:36 +00:00
parent 9e185a15f2
commit dd95fc5ca8
No known key found for this signature in database
GPG key ID: B0C6EB19DA7CEAA3

View file

@ -36,7 +36,7 @@ def download_pdf(url, file_name):
try:
fetched_file = urllib.request.urlopen(url)
except Exception as err:
print(err, file=sys.stderr)
print(url, err, file=sys.stderr)
return
with open(file_name, "wb") as fd: