diff --git a/model/mWeiboComments.php b/model/mWeiboComments.php index 6aab26a..598a409 100644 --- a/model/mWeiboComments.php +++ b/model/mWeiboComments.php @@ -136,6 +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; + } $res = $this->obj->execTrans2($sqls); if(!$res) { diff --git a/queue/deal/spider_weibo_comment.php b/queue/deal/spider_weibo_comment.php index e6fd97a..9e5b649 100644 --- a/queue/deal/spider_weibo_comment.php +++ b/queue/deal/spider_weibo_comment.php @@ -115,6 +115,7 @@ class spiderWeiboComment extends dealBase { $obj->writeLog(ZHISHIKU_SPIDER_LOG, ZHISHIKU_SPIDER_COMMENT, '抓取成功:'.$baselog); $rdobj->sRem(_RS_SPIDER_WEIBO_COMMENT, $weibo_id); + sleep(4); return true;