Extract the first paragraph from a Wikipedia article (Python)

前端 未结 10 1560
闹比i
闹比i 2020-11-28 01:36

How can I extract the first paragraph from a Wikipedia article, using Python?

For example, for Albert Einstein, that would be:

<
10条回答
  •  臣服心动
    2020-11-28 02:05

    Try a combination of urllib to fetch the site and BeautifulSoup or lxml to parse the data.

提交回复
热议问题