How to get information in info box of Wikipedia articles using Wikipedia api?

前端 未结 1 1280
悲哀的现实
悲哀的现实 2020-12-22 12:34

I\'m trying to get lead actor\'s name from movie\'s Wikipedia article.

I tried different values for prop, prop=info seems most relevant. But this doesn\'t contain th

相关标签:
1条回答
  • 2020-12-22 13:17

    The MediaWiki API doesn't understand infoboxes. So, you have basically two options:

    1. Parse the infobox yourself. You can either parse the wikitext directly or the generated HTML table (both are available from the API).
    2. Let somebody else do the parsing. This is exactly what DBPedia does. Wikidata tries to do something similar, but it probably won't contain enough data to be usable for a long time; see growth statistics.
    0 讨论(0)
提交回复
热议问题