Fetch excerpt from Wikipedia article?

后端 未结 4 1393
刺人心
刺人心 2020-12-08 17:37

I\'ve been up and down the Wikipedia API, but I can\'t figure out if there\'s a nice way to fetch the excerpt of an article (usually the first paragraph). It would

4条回答
  •  醉话见心
    2020-12-08 17:57

    Use this link to get the unparsed intro in xml form "http://en.wikipedia.org/w/api.php?format=xml&action=query&prop=extracts&exsentences=10&titles=Aati kalenja"

    Earlier I could get the introduction of a list of topics/articles from a category in a single page by adding iframes with src like the above link.. But now chrome is throwing this error - "Refused to display document because display forbidden by X-Frame-Options." Any way through? Pls help..

提交回复
热议问题