|
@@ -1,6 +1,7 @@
|
|
|
"""
|
|
|
@author: luojunhui
|
|
|
"""
|
|
|
+import json
|
|
|
import time
|
|
|
import schedule
|
|
|
from tqdm import tqdm
|
|
@@ -38,6 +39,7 @@ class UpdateAccountInfoVersion3(object):
|
|
|
D[account_name][dt] = fans
|
|
|
else:
|
|
|
D[account_name] = {dt: fans}
|
|
|
+ print(json.dumps(D, ensure_ascii=False, indent=4))
|
|
|
return D
|
|
|
|
|
|
@classmethod
|
|
@@ -70,7 +72,7 @@ class UpdateAccountInfoVersion3(object):
|
|
|
temp[4] = fans_dict.get(temp[3], {}).get(dt, 0)
|
|
|
temp[-1] = rate_dict.get(temp[3], {}).get(temp[1], 0)
|
|
|
temp[5] = fans_dict.get(temp[3], {}).get(dt, 0) * rate_dict.get(temp[3], {}).get(temp[1], 0)
|
|
|
-
|
|
|
+ print(temp)
|
|
|
usql = f"""
|
|
|
INSERT INTO account_avg_info_v3
|
|
|
(gh_id, position, update_time, account_name, fans, read_avg, like_avg, status, account_type, account_mode, account_source, account_status, business_type, read_rate_avg)
|
|
@@ -113,6 +115,7 @@ def updateDaily():
|
|
|
fd = Up.getAccountFans()
|
|
|
rd = Up.getAccountRate()
|
|
|
today_dt = datetime.today().__str__().split(" ")[0]
|
|
|
+ today_dt = '2024-09-12'
|
|
|
Up.reverseSingleDay(today_dt, fd, rd)
|
|
|
Up.lam.close()
|
|
|
Up.pq.close()
|