|
|
@@ -236,7 +236,7 @@ class GeWeService: |
|
|
|
response_data = await response.json() |
|
|
|
return response_data.get('data') |
|
|
|
|
|
|
|
async def get_detail_info(self, token_id, app_id, wxids): |
|
|
|
async def get_detail_info_async(self, token_id, app_id, wxids): |
|
|
|
''' |
|
|
|
获取群/好友详细信息 |
|
|
|
1<= wxids <=20 |
|
|
@@ -806,7 +806,7 @@ class GeWeService: |
|
|
|
cache.extend(f for f in friends_brief if f["nickName"]) |
|
|
|
friends_no_brief_wxid = [f['userName'] for f in friends_brief if not f["nickName"]] |
|
|
|
if friends_no_brief_wxid: |
|
|
|
detailed_info = self.get_detail_info(token_id, app_id, friends_no_brief_wxid) |
|
|
|
detailed_info = await self.get_detail_info_async(token_id, app_id, friends_no_brief_wxid) |
|
|
|
cache.extend(detailed_info) |
|
|
|
|
|
|
|
# 分批处理 |
|
|
@@ -822,7 +822,7 @@ class GeWeService: |
|
|
|
|
|
|
|
friends_no_brief_wxid = [f['userName'] for f in friends_brief if not f["nickName"]] |
|
|
|
if friends_no_brief_wxid: |
|
|
|
detailed_info = self.get_detail_info(token_id, app_id, friends_no_brief_wxid) |
|
|
|
detailed_info = await self.get_detail_info_async(token_id, app_id, friends_no_brief_wxid) |
|
|
|
cache.extend(detailed_info) |
|
|
|
|
|
|
|
# 更新缓存 |
|
|
|