爬取维基百科
我正在使用 Windows 网站下载器来爬行维基百科,我正在查看此工具中的整个选项,以找到下载特定时期(例如从 2005 年至今)维基百科页面的选项。
有人知道在特定时间段内抓取网站吗?
I'm going through crawling wikipedia using website downloader for windows, i was looking through the whole options in this tool to find an option to download wikipedia pages for specific period, for example from 2005 untill now.
Does anyone get any idea about crawling the website in specific period of time ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
为什么不下载包含所有维基百科的 SQL 数据库?
然后,您可以使用 SQL 进行查询。
Why not download the SQL database containing all of Wikipedia?
You can then query it using SQL.
尝试一下 Wikipedia API 和您的编程技能。
Give a try to the Wikipedia API and your programming skills.
应该不需要进行网页抓取;使用 MediaWiki API 直接请求您想要的信息。我不确定“特定时期的维基百科页面”是什么意思 - 您的意思是在某个时间最后编辑吗?如果是这样,在浏览时,我注意到一个 API 调用可以让您查看最后的
n
修订版;只需询问最后一次修订并查看其日期即可。There should be no need to do web scraping; use the MediaWiki API to directly request the information you want. I'm not sure what you mean by "wikipedia pages for a specific period" - do you mean last edited at a certain time? If so, while skimming, I noticed an API call that lets you get a look at the last
n
revisions; just ask for the last revision and see what its date is.这取决于相关网站是否提供存档,大多数情况下不提供,因此不可能以简单的方式抓取从特定日期开始的样本。但是您可以在爬虫中实现一些智能来读取页面创建日期或类似的内容。
但您也可以在 http://en.wikipedia.org/w/api 处查看 Wikipedia API。 php
It depends if the website in question offers the archive and mostly don't so its not possible in a straightforward way to crawl a sample started from specific date. But you can implement some intelligence in your crawler to read the page created date or something like that.
But you can also look at Wikipedia API at http://en.wikipedia.org/w/api.php