How do I grab just the parsed Infobox of a wikipedia article?

后端 未结 8 1661
萌比男神i
萌比男神i 2020-12-16 04:05

I\'m still stuck on my problem of trying to parse articles from wikipedia. Actually I wish to parse the infobox section of articles from wikipedia i.e. my application has re

8条回答
  •  醉酒成梦
    2020-12-16 04:14

    I suggest performing a WebRequest against wikipedia. From there you will have the page and you can simply parse or query out the data that you need using a regex, character crawl, or some other form that you are familiar with. Essentially a screen scrape!

    EDIT - I would add to this answer that you can use HtmlAgilityPack for those in C# land. For PHP it looks like SimpleHtmlDom. Having said that it looks like Wikipedia has a more than adequate API. This question probably answers your needs best:

    Is there a Wikipedia API?

提交回复
热议问题