Browse Source

视频号——bugfix

罗俊辉 1 year ago
parent
commit
2c8d25328f
1 changed files with 14 additions and 13 deletions
  1. 14 13
      shipinhao/shipinhao_author/shipinhao_scheduling.py

+ 14 - 13
shipinhao/shipinhao_author/shipinhao_scheduling.py

@@ -102,19 +102,20 @@ class ShiPinHaoAccount:
             }
             response = requests.request("GET", url, headers=headers, params=params)
 
-            try:
-                user_list = response.json()["acct_list"]
-            except:
-                if 20 >= datetime.datetime.now().hour >= 10:
-                    Feishu.bot(
-                        log_type=self.mode,
-                        crawler=self.platform,
-                        text="视频号Token 过期啦"
-                        # text=f"{token_dict['title']}\n操作人:{token_dict['operator']}\n更换日期:{token_dict['update_time']} \n频控啦,请扫码更换其他公众号token\nhttps://mp.weixin.qq.com/"
-                    )
-                # time.sleep(60 * 15)
-                # continue
-                return
+            # try:
+            #     user_list = response.json()["acct_list"]
+            # except:
+            #     if 20 >= datetime.datetime.now().hour >= 10:
+            #         Feishu.bot(
+            #             log_type=self.mode,
+            #             crawler=self.platform,
+            #             text="视频号Token 过期啦"
+            #             # text=f"{token_dict['title']}\n操作人:{token_dict['operator']}\n更换日期:{token_dict['update_time']} \n频控啦,请扫码更换其他公众号token\nhttps://mp.weixin.qq.com/"
+            #         )
+            #     # time.sleep(60 * 15)
+            #     # continue
+            #     return
+            user_list = response.json()["acct_list"]
             target_user = find_target_user(name=self.account_name, user_list=user_list)
             # 写入 MySql 数据库
             if target_user: