From 215cf65f77dca73d95654d0bbf7e9b2460ede61f Mon Sep 17 00:00:00 2001 From: longchao <1432334894@qq.com> Date: Tue, 22 Jul 2025 14:38:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=87=E6=9C=9Fcookie=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- queue/deal/spider_weibo_comment.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/queue/deal/spider_weibo_comment.php b/queue/deal/spider_weibo_comment.php index 98ad727..8866bba 100644 --- a/queue/deal/spider_weibo_comment.php +++ b/queue/deal/spider_weibo_comment.php @@ -22,6 +22,11 @@ class spiderWeiboComment extends dealBase { if($rdobj->llen(_RQ_SPIDER_WEIBO_COMMENT) + 0 > 0) $obj->writeLog(ZHISHIKU_SPIDER_LOG, ZHISHIKU_SPIDER_COMMENT, 'cookie为空:'.$baselog); exit; } + $cookie_data = json_decode($cookie_json, true); + if(empty($cookie_data[PROC_CODE])) { + $obj->writeLog(ZHISHIKU_SPIDER_LOG, ZHISHIKU_SPIDER_COMMENT, '未设置该进程cookie~:'.$baselog.'|'.$cookie_json); + exit; + } $ipinfo = $rdobj->get(_RC_SPIDER_WEIBO_COMMENT_USE_IP); $ipdata = json_decode($ipinfo, true); @@ -39,8 +44,6 @@ class spiderWeiboComment extends dealBase { $obj->writeLog(ZHISHIKU_SPIDER_LOG, ZHISHIKU_SPIDER_COMMENT, '抓取开始:'.$baselog.'|'.$rq_data); - $cookie_data = json_decode($cookie_json, true); - $rq_data = json_decode($rq_data, true); if(!empty($rq_data['cookie'])) { $cookie = $rq_data['cookie'];