【文件属性】:
文件名称:pickupadvance:PHP爬虫升级版,基于swoole与QueryList
文件大小:24KB
文件格式:ZIP
更新时间:2021-04-28 04:35:41
PHP
PHP爬虫,基于swoole与QueryList
执行方式:CLI
启动: #php start.php
停止: #php stop.php
运行环境
php >= 7.0 配置swoole扩展与redis扩展
执行顺序
1. 执行php tastqueue.php,安排任务队列queue。
2. swoole启动分布式任务,每五分钟会执行一次。
3. QueryList采集queue队列,将整理好的数据入库
爬虫说明
1. 执行失败的任务会进入errorlist队列
2. 有任务失败,会自动重新检测代理池,移除失效代理。
3. 依赖库composer.json:
{
"require": {
"jaeger/querylist": "^4.0",
"illuminate/database":"~4.2"
}
}
4. Pickup::setRule()
【文件预览】:
pickupadvance-master
----.gitignore(16B)
----library()
--------Server.php(3KB)
--------Pickup.php(19KB)
--------Process.php(2KB)
----test.php(952B)
----imglocally.php(2KB)
----start.php(492B)
----composer.json(165B)
----composer.lock(45KB)
----README.md(901B)
----stop.php(624B)
----taskqueue.php(2KB)
----process.php(480B)
----includes()
--------pickup.php(7KB)
--------server.php(3KB)
--------db.php(537B)
--------errorReport.php(680B)
--------autoload.php(337B)