update
This commit is contained in:
@ -58,6 +58,7 @@ class BaiduRecordCommand extends BaseSpider
|
|||||||
// 采集新闻板块
|
// 采集新闻板块
|
||||||
private function _start(int|bool $id = false)
|
private function _start(int|bool $id = false)
|
||||||
{
|
{
|
||||||
|
$times = 0;
|
||||||
$cache = [];
|
$cache = [];
|
||||||
$requestCookie = '';
|
$requestCookie = '';
|
||||||
$query = AppNews::query()
|
$query = AppNews::query()
|
||||||
@ -97,8 +98,11 @@ class BaiduRecordCommand extends BaseSpider
|
|||||||
|
|
||||||
if (stripos($res, '验证') !== false || stripos($res, 'wappass') !== false) {
|
if (stripos($res, '验证') !== false || stripos($res, 'wappass') !== false) {
|
||||||
$this->log->info('有验证码!!');
|
$this->log->info('有验证码!!');
|
||||||
|
$times++;
|
||||||
// 有验证码就跳出
|
// 有验证码就跳出
|
||||||
return;
|
if ($times > 1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
(new Crawler($res))?->filter('.abs')?->each(function ($node) use ($domain, $item) {
|
(new Crawler($res))?->filter('.abs')?->each(function ($node) use ($domain, $item) {
|
||||||
|
Reference in New Issue
Block a user