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; }