mirror of
https://github.com/NullHypothesis/censorbib.git
synced 2025-07-25 15:35:55 -04:00
Show which url fails to request.
This commit is contained in:
parent
9e185a15f2
commit
dd95fc5ca8
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ def download_pdf(url, file_name):
|
||||||
try:
|
try:
|
||||||
fetched_file = urllib.request.urlopen(url)
|
fetched_file = urllib.request.urlopen(url)
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
print(err, file=sys.stderr)
|
print(url, err, file=sys.stderr)
|
||||||
return
|
return
|
||||||
|
|
||||||
with open(file_name, "wb") as fd:
|
with open(file_name, "wb") as fd:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue