From 20e09bc07371c4f013e7a46b7137ca1795188aa2 Mon Sep 17 00:00:00 2001 From: longchao <1432334894@qq.com> Date: Wed, 16 Jul 2025 14:31:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9C=80=E5=90=8E=E4=B8=80?= =?UTF-8?q?=E9=A1=B5=E8=AF=84=E8=AE=BA=E5=85=A5=E5=BA=93=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/mWeiboComments.php | 3 ++- queue/deal/spider_weibo_comment.php | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/model/mWeiboComments.php b/model/mWeiboComments.php index 598a409..2f9aaa5 100644 --- a/model/mWeiboComments.php +++ b/model/mWeiboComments.php @@ -136,9 +136,10 @@ class mWeiboComments extends mBase { $rdata['weibo_id'] = $weibo_id; $rdata['is_load_all'] = count($source_data['data']) <= 0 ? true : false; if(empty($source_data['data']) || count($source_data['data']) <= 0) return $rdata; + if(isset($source_data['max_id']) && $source_data['max_id'] == 0) { $rdata['is_load_all'] = true; - return $rdata; + if(empty($sqls)) return $rdata; } $res = $this->obj->execTrans2($sqls); diff --git a/queue/deal/spider_weibo_comment.php b/queue/deal/spider_weibo_comment.php index 0722c69..16b150b 100644 --- a/queue/deal/spider_weibo_comment.php +++ b/queue/deal/spider_weibo_comment.php @@ -123,7 +123,6 @@ class spiderWeiboComment extends dealBase { $rdobj = $obj->initRedis(); $rds = $rdobj->rpush(_RQ_SPIDER_WEIBO_COMMENT, json_encode($res)); $obj->writeLog(ZHISHIKU_SPIDER_LOG, ZHISHIKU_SPIDER_COMMENT, '抓取下一页:'.$baselog.'|result:'.json_encode($res).'|redis:'.$rds); - return true; }