|
@@ -6,7 +6,6 @@ import traceback
|
|
|
from typing import List, Set, Dict, Tuple
|
|
|
|
|
|
from tqdm import tqdm
|
|
|
-from datetime import datetime
|
|
|
from pymysql.cursors import DictCursor
|
|
|
|
|
|
from applications import WeixinSpider, longArticlesMySQL, log, bot, aiditApi
|
|
@@ -67,7 +66,7 @@ class WeixinAccountCrawler(object):
|
|
|
"""
|
|
|
:return:
|
|
|
"""
|
|
|
- publish_timestamp_threshold = int(datetime.strptime(run_date, "%Y-%m-%d").timestamp()) - const.STAT_PERIOD
|
|
|
+ publish_timestamp_threshold = int(run_date.timestamp()) - const.STAT_PERIOD
|
|
|
sql = f"""
|
|
|
SELECT distinct title
|
|
|
FROM datastat_sort_strategy
|
|
@@ -188,14 +187,11 @@ class WeixinAccountCrawler(object):
|
|
|
}
|
|
|
)
|
|
|
|
|
|
- def run(self, run_date=None) -> None:
|
|
|
+ def run(self, run_date) -> None:
|
|
|
"""
|
|
|
入口函数
|
|
|
:return:
|
|
|
"""
|
|
|
- if not run_date:
|
|
|
- run_date = time.strftime("%Y-%m-%d", time.localtime())
|
|
|
-
|
|
|
# get seed titles
|
|
|
title_list = self.get_seed_titles(run_date)
|
|
|
# get inner accounts set
|