如何从维基百科中获取所有关于人的文章? [英] How do I get all articles about people from Wikipedia?
本文介绍了如何从维基百科中获取所有关于人的文章?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
从维基百科获取所有关于人物的文章的最简单方法是什么?我知道我可以下载所有页面的转储,但是我如何过滤这些页面并只获取关于人的页面?我需要尽可能多的(最好超过一百万),因此使用任何类型的 API 可能都不是一种选择.
What would be the easiest way to get all articles about people from Wikipedia? I know I can download a dump of all the pages, but then how do I filter those and get only the ones about people? I need as many as I can get (preferably more than a million) so using any sort of API is probably not an option.
推荐答案
由于关于人的文章通常包含 Persondata 模板,您可以搜索所有包含 Persondata 的文章.您可以在此处找到用于执行此操作的示例 API 查询:
Since articles about people usually contain the Persondata template, you can just search for all articles that contain Persondata. You can find a sample API query for doing just that here:
这篇关于如何从维基百科中获取所有关于人的文章?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文