bear-zd / ChaoXingReserveSeat

超星学习通图书馆抢座脚本
66 stars 71 forks source link

token值为空 #22

Closed TXP9 closed 2 months ago

TXP9 commented 2 months ago
          我修改了token仍然报错,问题是一样的 @bear-zd ,好的  下次有问题重新开一个issue

Originally posted by @TXP9 in https://github.com/bear-zd/ChaoXingReserveSeat/issues/21#issuecomment-2243090289

TXP9 commented 2 months ago

def _get_page_token(self, url): response = self.requests.get(url=url, verify=False) html = response.content.decode('utf-8') token = re.findall(r"token: '([^'])'", html)[0] if re.findall(r"token: '([^'])'", html) else "" return token

TXP9 commented 2 months ago

2024-07-22 22:34:19,935 - INFO - start time 22:34:19, action off 2024-07-22 22:34:19,935 - INFO - Global settings: SLEEPTIME: 0.2 ENDTIME: 23:59:00 ENABLE_SLIDER: True RESERVE_NEXT_DAY: True 2024-07-22 22:34:19,935 - INFO - ----------- -- ['12:00', '13:00'] -- ['029'] try ----------- 2024-07-22 22:34:20,295 - INFO - User D1J6VZ8ZKKMb8bJz0uEPTA== login successfully 2024-07-22 22:34:20,476 - INFO - Get token: 2024-07-22 22:34:20,476 - INFO - Start to resolve captcha token 2024-07-22 22:34:20,573 - INFO - Successfully get prepared captcha_token EE296A5D8ECA1C541A1AA9B977459100 2024-07-22 22:34:20,573 - INFO - Captcha Image URL-small https://captcha-c.chaoxing.com/slide/small/D97DE787532815FE8BA8121965343FDF.jpg, URL-big https://captcha-c.chaoxing.com/slide/big/D97DE787532815FE8BA8121965343FDF.jpg 2024-07-22 22:34:20,784 - INFO - Successfully calculate the captcha distance 182 2024-07-22 22:34:20,816 - INFO - Successfully resolve the captcha token {'error': 0, 'msg': 'ok', 'result': True, 'extraData': '{"validate":"validate_42sxgHoTPTKbt0uZxPJ7ssOvtXr3ZgZ1_EE296A5D8ECA1C541A1AA9B977459100"}'} 2024-07-22 22:34:20,816 - INFO - Captcha token validate_42sxgHoTPTKbt0uZxPJ7ssOvtXr3ZgZ1_EE296A5D8ECA1C541A1AA9B977459100 2024-07-22 22:34:20,816 - INFO - submit parameter {'roomId': '2153', 'startTime': '12:00', 'endTime': '13:00', 'day': '2024-07-23', 'seatNum': '029', 'captcha': 'validate_42sxgHoTPTKbt0uZxPJ7ssOvtXr3ZgZ1_EE296A5D8ECA1C541A1AA9B977459100', 'token': ''} 2024-07-22 22:34:20,848 - INFO - {'msg': '预约失败,请退出后重试!', 'success': False}

bear-zd commented 2 months ago

昨天遇到了一个你校校友,我在ext做了开发喝修改,你可以直接拉取使用

bear-zd commented 2 months ago

如果3个工作日内没有问题我就关闭这个issue了