This commit is contained in:
toom1996
2025-07-30 12:25:49 +08:00
parent 68e874a2b3
commit ba4f547a89

View File

@ -65,6 +65,7 @@ class BaiduRecordCommand extends BaseSpider
$query = $query->where('id', $id); $query = $query->where('id', $id);
} }
$query?->each(function($item) use (&$requestCookie, &$cache) { $query?->each(function($item) use (&$requestCookie, &$cache) {
sleep(1);
try { try {
if (!$item->platform) { if (!$item->platform) {
throw new \Exception('没找到平台!!'); throw new \Exception('没找到平台!!');
@ -87,8 +88,8 @@ class BaiduRecordCommand extends BaseSpider
if ($cookie) { if ($cookie) {
$requestCookie = $cookie; $requestCookie = $cookie;
} }
var_dump($res);
if (stripos($res, '验证') !== false) { if (stripos($res, '验证') !== false || stripos($res, 'wappass') !== false) {
$this->log->info('有验证码!!'); $this->log->info('有验证码!!');
} }
@ -104,7 +105,7 @@ class BaiduRecordCommand extends BaseSpider
$this->log->info($exception->getTraceAsString()); $this->log->info($exception->getTraceAsString());
} }
}, 1); }, 10);
return; return;
} }