Commit c0b50e3f authored by litaolemo's avatar litaolemo

update

parent b3b96299
......@@ -311,14 +311,15 @@ def get_count_hot_crawler_data_from_mysql(start_ts: int) -> Dict:
res_dict = {}
for platform_id in data_platform_id_list:
start_date = datetime.datetime.fromtimestamp(start_ts / 1e3)
start_date_str = start_date.strftime("%Y-%m-%d %H:%M:%S")
match_all_sql = """select count(id) as nums from api_tractate where create_time >= '{time}' and platform = {platfrom}""".format(
time=str(start_date), platfrom=platform_id)
time=start_date_str, platfrom=platform_id)
cur_mimas.execute(match_all_sql)
data = cur_mimas.fetchall()
match_all_num = data[0][0]
# print(match_all_num)
oneline_sql = """select count(id) as nums from api_tractate where create_time >= '{time}' and is_online = 1 and pgc_type = 1""".format(
time=str(start_date))
time=start_date_str)
cur_mimas.execute(oneline_sql)
data = cur_mimas.fetchall()
match_oneline_num = data[0][0]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment