【发布时间】:2019-05-17 04:41:27
【问题描述】:
我有这个用 Python 3 编写的脚本:
response = simple_get("https://en.wikipedia.org/wiki/Mathematics")
result = {}
result["url"] = url
if response is not None:
html = BeautifulSoup(response, 'html.parser')
title = html.select("#firstHeading")[0].text
如您所见,我可以从文章中获得标题,但我不知道如何将文本从“数学(来自希腊语 μά...”)获取到目录...
【问题讨论】:
标签: python html web-scraping beautifulsoup wikipedia