|
|
@@ -270,6 +270,13 @@ class CrawlerGzhFans(CrawlerGzhFansBase):
|
|
|
|
|
|
# 通过 access_token && open_id 抓取 union_id
|
|
|
async def get_union_ids_for_each_account(self, account_info: dict):
|
|
|
+ # 通过 access_token 获取 union_id
|
|
|
+ user_list = await self.get_open_id_list_from_database(
|
|
|
+ gh_id=account_info["gh_id"]
|
|
|
+ )
|
|
|
+ if not user_list:
|
|
|
+ return
|
|
|
+
|
|
|
access_token_info = await self.get_access_token_from_database(
|
|
|
account_info["gh_id"]
|
|
|
)
|
|
|
@@ -284,10 +291,6 @@ class CrawlerGzhFans(CrawlerGzhFansBase):
|
|
|
)
|
|
|
return
|
|
|
|
|
|
- # 通过 access_token 获取 union_id
|
|
|
- user_list = await self.get_open_id_list_from_database(
|
|
|
- gh_id=account_info["gh_id"]
|
|
|
- )
|
|
|
access_token = access_token_info[0]["access_token"]
|
|
|
union_info = await get_union_id_batch(
|
|
|
access_token=access_token, user_list=user_list
|