Explorar o código

Merge branch '2025-02-07-add-new-touliu-accounts' of luojunhui/LongArticlesJob into master

luojunhui hai 2 meses
pai
achega
e6c283e926
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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))