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'];