我想從一個站點(https://www.vanglaini.org/)收集鏈接:/hmarchhak/102217 并將其打印為https://www.vanglaini.org/hmarchhak/102217。請幫忙 看圖import requestsimport pandas as pdfrom bs4 import BeautifulSoupsource = requests.get('https://www.vanglaini.org/').textsoup = BeautifulSoup(source, 'lxml')for article in soup.find_all('article'): headline = article.a.text summary=article.p.text link = article.a.href print(headline) print(summary) print(link)print()這是我的代碼。
如何使用 BeautifulSoup 在 Python 中接收網站鏈接
慕的地6264312
2022-06-22 18:00:09