维基百科信息框的内容 [英] Content of infobox of Wikipedia

查看:117
本文介绍了维基百科信息框的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要获取任何电影的信息框的内容.我知道电影的名字.一种方法是获取Wikipedia页面的完整内容,然后解析它,直到找到{{Infobox,然后获取信息框的内容.

I need to get the content of an infobox of any movie. I know the name of the movie. One way is to get the complete content of a Wikipedia page and then parse it until I find {{Infobox and then get the content of the infobox.

使用某些API或解析器是否还有其他方法可以实现?

Is there any other way for the same using some API or parser?

我正在使用Python和pywikipediabot API.

I am using Python and the pywikipediabot API.

我也熟悉wikitools API.因此,如果有人具有与wikitools API相关的解决方案,请不要使用pywikipedia,也请提一下.

I am also familiar with the wikitools API. So instead of pywikipedia if someone has solution related to the wikitools API, please mention that as well.

推荐答案

请代替 DBPedia ,它已经将所有Wikipedia信息框提取为易于解析的数据库格式.

Instead of reinventing the wheel, check out DBPedia, which has already extracted all Wikipedia infoboxes into an easily parsable database format.

这篇关于维基百科信息框的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆