|
@@ -76,7 +76,7 @@ class WeixinVideoCrawler(object):
|
|
|
latest_crawler_timestamp = const.DEFAULT_TIMESTAMP
|
|
|
# 调用爬虫接口
|
|
|
response = spider.update_msg_list(gh_id, index=cursor)
|
|
|
- if response['code'] == 0:
|
|
|
+ if response['code'] == const.REQUEST_SUCCESS:
|
|
|
# 一般返回最近10天的msg_list
|
|
|
msg_list = response.get('data', {}).get("data", [])
|
|
|
if msg_list:
|
|
@@ -181,11 +181,11 @@ class WeixinVideoCrawler(object):
|
|
|
抓取任务
|
|
|
:return:
|
|
|
"""
|
|
|
- account_list = self.get_crawler_accounts()
|
|
|
+ account_list = self.get_crawler_accounts()[2:3]
|
|
|
for account_obj in tqdm(account_list, desc="crawler_video_for_each_account"):
|
|
|
self.crawler_article_video_list(account_obj)
|
|
|
self.update_account_latest_crawler_timestamp(gh_id=account_obj["gh_id"])
|
|
|
- time.sleep(1)
|
|
|
+ time.sleep(const.SLEEP_SECONDS)
|
|
|
|
|
|
def mention(self, start_timestamp):
|
|
|
"""
|