From 6d04f423aa074184f8d0090ffabb21d8de31e2ec Mon Sep 17 00:00:00 2001 From: guanjihuan Date: Wed, 29 Jun 2022 17:25:40 +0800 Subject: [PATCH] Update download_references_in_a_pdf_file_with_python.py --- .../download_references_in_a_pdf_file_with_python.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/language_learning/2020.10.31_download_references_in_a_pdf_file_with_python/download_references_in_a_pdf_file_with_python.py b/language_learning/2020.10.31_download_references_in_a_pdf_file_with_python/download_references_in_a_pdf_file_with_python.py index 8317d04..2402cc2 100644 --- a/language_learning/2020.10.31_download_references_in_a_pdf_file_with_python/download_references_in_a_pdf_file_with_python.py +++ b/language_learning/2020.10.31_download_references_in_a_pdf_file_with_python/download_references_in_a_pdf_file_with_python.py @@ -55,7 +55,8 @@ def download(links): print('\n响应结果是:', r) print('访问的地址是:', r.url) soup = BeautifulSoup(r.text, features='lxml') - pdf_URL = soup.iframe['src'] + pdf_URL = soup.embed['src'] + # pdf_URL = soup.iframe['src'] # This is a code line of history version which fails to get pdf URL. if re.search(re.compile('^https:'), pdf_URL): pass else: