From c0817d2ca1f628c6e61438c405679c52a0d660b4 Mon Sep 17 00:00:00 2001 From: Samueli924 <454867105@qq.com> Date: Tue, 26 Apr 2022 22:13:30 +0800 Subject: [PATCH] fix verify bug --- api/chaoxing.py | 2 +- main.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/chaoxing.py b/api/chaoxing.py index b24775a..a897faf 100644 --- a/api/chaoxing.py +++ b/api/chaoxing.py @@ -29,7 +29,7 @@ def __init__(self, usernm, passwd, debug, show): def init_explorer(self): self.session = requests.session() self.session.headers = { - 'User-Agent': f'Dalvik/2.1.0 (Linux; U; Android {random.randint(9, 12)}; MI{random.randint(10, 12)} Build/SKQ1.210216.001) (device:MI{random.randint(10, 12)}) Language/zh_CN com.chaoxing.mobile/ChaoXingStudy_3_5.1.4_android_phone_614_74(@Kalimdor)_{secrets.token_hex(16)}', + 'User-Agent': f'Dalvik/2.1.0 (Linux; U; Android {random.randint(9, 12)}; MI{random.randint(10, 12)} Build/SKQ1.210216.001) (device:MI{random.randint(10, 12)}) Language/zh_CN com.chaoxing.mobile/ChaoXingStudy_3_5.1.4_android_phone_614_74 (@Kalimdor)_{secrets.token_hex(16)}', 'X-Requested-With': 'com.chaoxing.mobile' } diff --git a/main.py b/main.py index 07174c9..8541ebe 100644 --- a/main.py +++ b/main.py @@ -89,7 +89,7 @@ def do_work(chaoxingAPI): chaoxingAPI.speed, chaoxingAPI.get_current_ms ) - ft.pause(1, 3) + ft.pause(10, 13) chaoxing.speed = set_speed # 预防ERR @@ -154,7 +154,7 @@ def do_work(chaoxingAPI): logger.debug("当前设置速率:"+str(chaoxing.speed)+"倍速") if not disable_adopt and set_speed == 1: # Only God and I knew how it worked. if not use_default and not use_adopt: - set_adopt=input("是否启用自适应速率(当播放速率为1且视频支持倍速播放时,自动切换为两倍速)\n!注意 该功能可能存在风险!输入(Y/y/Yes/yes)启用").lower() + set_adopt = input("是否启用自适应速率(当播放速率为1且视频支持倍速播放时,自动切换为两倍速)\n!注意 该功能可能存在风险!输入(Y/y/Yes/yes)启用").lower() if use_default or use_adopt or set_adopt.startswith('y'): adopt = True else: