|
|
@@ -114,12 +114,12 @@ class CrawlerGzhFans(CrawlerGzhFansBase):
|
|
|
return
|
|
|
|
|
|
if not account_info.get("cursor_openid"):
|
|
|
- cursor_openid = ''
|
|
|
+ cursor_openid = ""
|
|
|
else:
|
|
|
cursor_openid = account_info["cursor_openid"]
|
|
|
|
|
|
if not account_info.get("cursor_timestamp"):
|
|
|
- cursor_timestamp = ''
|
|
|
+ cursor_timestamp = ""
|
|
|
else:
|
|
|
cursor_timestamp = account_info["cursor_timestamp"]
|
|
|
|
|
|
@@ -152,7 +152,7 @@ class CrawlerGzhFans(CrawlerGzhFansBase):
|
|
|
account_info["gh_id"], next_cursor_id, next_cursor_timestamp
|
|
|
)
|
|
|
|
|
|
- case '00040':
|
|
|
+ case "00040":
|
|
|
print(f"token 非法: {error_msg}")
|
|
|
await self.set_cookie_token_as_invalid(account_info["gh_id"])
|
|
|
await feishu_robot.bot(
|
|
|
@@ -177,7 +177,9 @@ class CrawlerGzhFans(CrawlerGzhFansBase):
|
|
|
access_token = await self.get_access_token_from_database(account_info["gh_id"])
|
|
|
if not access_token:
|
|
|
print(f"{account_info['account_name']}: access_token is not available")
|
|
|
- response = await get_access_token(account_info['app_id'], account_info["app_secret"])
|
|
|
+ response = await get_access_token(
|
|
|
+ account_info["app_id"], account_info["app_secret"]
|
|
|
+ )
|
|
|
print(json.dumps(response, indent=4, ensure_ascii=False))
|
|
|
# access_token = response.get("access_token")
|
|
|
# await self.set_access_token_for_each_account(account_info["gh_id"], access_token)
|