Przeglądaj źródła

新增 requirements.txt

罗俊辉 7 miesięcy temu
rodzic
commit
e7ca659b08
2 zmienionych plików z 5 dodań i 2 usunięć
  1. 4 1
      updateAccountV3.py
  2. 1 1
      updateMinigramInfoDaily.py

+ 4 - 1
updateAccountV3.py

@@ -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()

+ 1 - 1
updateMinigramInfoDaily.py

@@ -324,7 +324,7 @@ def updateMinigramInfoJob():
 
 
 if __name__ == '__main__':
-    updateMinigramInfoJob()
+    # updateMinigramInfoJob()
     schedule.every().day.at("01:30").do(Functions().job_with_thread, updateArticlesJob)
 
     schedule.every().day.at("03:30").do(Functions().job_with_thread, updateMinigramInfoJob)