From dd95fc5ca86b6f639a5794dd46ebf262cfee349a Mon Sep 17 00:00:00 2001 From: gfw-report Date: Sat, 26 Mar 2022 05:18:36 +0000 Subject: [PATCH] Show which url fails to request. --- fetch_pdfs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fetch_pdfs.py b/fetch_pdfs.py index b48f303..77b84be 100755 --- a/fetch_pdfs.py +++ b/fetch_pdfs.py @@ -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: