unix – 使用wget从谷歌学者搜索结果下载所有pdf文件
我想写一个简单的网络蜘蛛或只是使用wget从谷歌学者下载pdf结果.这对于获得研究论文来说实际上是一种非常漂亮的方式.
我已经在stackoverflow上阅读了以下页面: Crawl website using wget and limit total number of crawled links How do web spiders differ from Wget’s spider? Downloading all PDF files from a website How to download all files (but not HTML) from a website using wget? 最后一页可能是最具启发性的.我确实按照this的建议尝试使用wget. 我的谷歌学者搜索结果页面是thus但没有下载任何内容. 鉴于我对webspiders的理解程度很低,我该怎么做才能实现这一目标?我确实认识到写蜘蛛可能非常复杂,这是我可能不想进行的项目.如果可以使用wget,那将是非常棒的. wget -e robots=off -H --user-agent="Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008092416 Firefox/3.0.3" -r -l 1 -nd -A pdf http://scholar.google.com/scholar?q=filetype%3Apdf+liquid+films&btnG=&hl=en&as_sdt=0%2C23 有几点需要注意: >在搜索查询中使用filetyle:pdf 当然,限制只会是第一页的结果.你可以扩展递归的深度,但这将是疯狂的并且永远.我建议使用像Beautiful Soup和wget子进程这样的组合,以便您可以战略性地解析和遍历搜索结果. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |