Update download_references_in_a_pdf_file_with_python.py

This commit is contained in:
guanjihuan 2022-06-29 17:25:40 +08:00
parent 23be72b2c1
commit 6d04f423aa

View File

@ -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: