gzldc / 12306

12306抢票脚本
MIT License
683 stars 188 forks source link

select_ticket_info.select().main(),求助 #18

Open raydied4 opened 3 years ago

raydied4 commented 3 years ago

报错信息,求助 Traceback (most recent call last): File "run.py", line 22, in select_ticket_info.select().main() File "C:\Users\Administrator\Downloads\Compressed\12306-master\init\select_ticket_info.py", line 115, in main l.reqLiftTicketInit() File "C:\Users\Administrator\Downloads\Compressed\12306-master\inter\LiftTicketInit.py", line 18, in reqLiftTicketInit matchObj = re.search('var CLeftTicketUrl = \'(.*)\'', result, re.M|re.I); File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\re.py", line 183, in search return _compile(pattern, flags).search(string) TypeError: expected string or bytes-like object

stockbsd commented 3 years ago

re.search('var CLeftTicketUrl = '(.*)'', result, re.M|re.I) 把字符串 外层的单引号改为 双引号,去掉\。