Home >Backend Development >PHP Tutorial >网页爬虫 - PHP网络爬虫

网页爬虫 - PHP网络爬虫

WBOY
WBOYOriginal
2016-06-06 20:48:161081browse

想用PHP写个数据采集的程序,不知道有没有库推荐?

回复内容:

想用PHP写个数据采集的程序,不知道有没有库推荐?

snoopy库 这里是介绍,可以去看看

很少有人推荐simple_html_dom吗?
http://simplehtmldom.sourceforge.net/
看看他的description:

<code>A HTML DOM parser written in PHP5+ let you manipulate HTML in a very easy way!
Require PHP 5+.
Supports invalid HTML.
Find tags on an HTML page with selectors just like jQuery.
Extract contents from HTML in a single line.
</code>

phpQuery不错

可以用Phpfetcher:Phpfetcher
很简单,没有其它依赖,而且里面的例子都是直接就能运行的
例子里面包括爬取腾讯新闻,爬取百度搜索结果等,可以看一下

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn