navari / spider-vo
spider vo 捕集器
1
2020-12-20 16:21 UTC
Requires
- guzzlehttp/guzzle: ^7.2
README
安装命令 composer require navari/spider-vo
启动类
$spider = new Spider((new Client()));
通过写入您使用的http包。
所需方法
$spider->setAgencyId(example_agency_id);
需要发送 代理ID。如果不发送,将不会获取。
抓取所有页面上的广告
$spider->getAllPage();
将返回数组,每个数组的内容如下示例响应:
Array ( [name] => DS-DS3- 1.6 BlueHDi S&S - 100 So Chic [link] => https://www.spider-vo.net/ds-ds3--16-bluehdi-ss---100-so-chic,svos62.html?vid=1157818 [image] => https://www.spider-vo.net/ds-ds3--16-bluehdi-ss---100-so-chic,fm-svosites!fd001!78567038!n.jpg [brand] => DS DS3 [model] => 1.6 BlueHDi S&S - 100 So Chic [description] => 2016- | 134 250 km | Diesel [price] => 9 990 € )
要返回单个页面,则
$spider->get(sayfa_numarası);
可以操作。所有方法都返回相同的数组结构。