Extract the first paragraph from a Wikipedia article (Python)

前端 未结 10 1563
闹比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 01:52

    First, I promise I am not being snarky.

    Here's a previous question that might be of use: Fetch a Wikipedia article with Python

    In this someone suggests using the wikipedia high level API, which leads to this question:

    Is there a Wikipedia API?

提交回复
热议问题