Przeglądaj źródła

投流账号配置修改为apollo,增加四个新账号

luojunhui 2 miesięcy temu
rodzic
commit
377f335cd2
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      updateAccountV3.py

+ 2 - 1
updateAccountV3.py

@@ -14,6 +14,7 @@ from config import apolloConfig
 
 config = apolloConfig()
 unauthorized_account = json.loads(config.getConfigValue("unauthorized_gh_id_fans"))
+touliu_accounts = set(json.loads(config.getConfigValue("touliu_gh_id_list")))
 
 
 def get_account_fans_by_dt(db_client) -> dict:
@@ -131,7 +132,7 @@ class UpdateAccountInfoVersion3(object):
         rate_dict = self.get_account_position_read_rate(dt)
         for account in tqdm(account_list, desc=dt):
             gh_id = account["gh_id"]
-            business_type = self.const.TOULIU if gh_id in self.const.TOULIU_ACCOUNTS else self.const.ARTICLES_DAILY
+            business_type = self.const.TOULIU if gh_id in touliu_accounts else self.const.ARTICLES_DAILY
             fans = fans_dict.get(gh_id, {}).get(dt, 0)
             if not fans:
                 fans = int(unauthorized_account.get(gh_id, 0))