Home  >  Article  >  Backend Development  >  php爬虫链接池和链接调度怎么写?

php爬虫链接池和链接调度怎么写?

WBOY
WBOYOriginal
2016-06-06 20:27:531082browse

php爬虫链接池和链接调度怎么写?

链接池功能:1、 存储链接;2、 对链接去重;3、对链接设置优先级。
实践方案有:1、保存在数据库;2、redis;3、内存集合;4、队列。

链接池和抓取调度的代码怎么写?

回复内容:

php爬虫链接池和链接调度怎么写?

链接池功能:1、 存储链接;2、 对链接去重;3、对链接设置优先级。
实践方案有:1、保存在数据库;2、redis;3、内存集合;4、队列。

链接池和抓取调度的代码怎么写?

先将所有待爬取的链接取到,然后将每个链接的抓取动作放到队列中,推荐使用beanstalk,最后又队列执行这些动作。

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