Open V-I-C-T-O-R opened 5 years ago
@ericline 自动识别验证码免费接口当前废了,修改验证方式为手动输入就可以了
@V-I-C-T-O-R 好的,谢谢回复啦
请问一下为什么余票充足的情况下会出现这种情况呀,显示订单提交成功但是我去12306上查不到订单
正在为您第1次刷票,当前时间为:2019-05-11 08:50:49 C5010 二等座: 有 已为您查询到可用余票:[车次:C5010,出发站:庙山,到达站:武昌,出发时间:20:07,到达时间:20:31] 提交订单请求成功! 获取乘客信息成功!
'NoneType' object has no attribute 'passengerName'
[32m提交订单请求成功![39m [32m获取乘客信息成功![39m [32m校验订单信息成功![39m [32mK2058 剩余车票:573,440 ,目前排队人数: 0[39m [31mconfirmSingleOrGoForQueue: 出票失败!
https://blog.csdn.net/weixin_34357436/article/details/86866770,12306下单流程解析 发现这个问题是座位选择引起的,在座位选择里不传入参数就能正常出票。
[32mK2058 剩余车票:156 ,目前排队人数: 0[39m [32m正在排队获取订单![39m [32m[1]正在等待订单提交结果...[39m [32m订单提交成功,订单号: E807970165[39m [32m您已成功订购火车票!请在30分钟内前往12306官方网站进行支付![39m [31m None [39m [34m注销登录成功[39m
不能发送邮件通知通常会是什么原因?
@zhubery 看你具体是怎么配置,还有具体异常
name 'Image' is not defined
@xuanGetit 本地没出现你表述的问题,依赖包要安装好
@xuanGetit 本地没出现你表述的问题,依赖包要安装好
遇到新问题了
第1次尝试获取验证图片
识别坐标:182,113,254,126
验证码识别成功
Traceback (most recent call last):
File "fuckeverything.py", line 127, in
用你的最新代码,已经OK了,谢谢
@xuanGetit 12306有个device_id会每次更新,但是对应的JS写的稀里糊涂,破解有点惨不忍睹。你有兴趣可以去试试
正在为您第1次刷票,当前时间为:2019-05-31 16:01:40 2590 硬座: 有
请问这个是什么原因(confirmSingleOrGoForQueue: 非法的订票请求!),谢谢!!
成功了,就是不知道为什么短信没收到。那个短信网站上也显示发出来了,号码也没错,第一次的test短信也收到了。明天再试一试用自动识别
@wangqianb 这个可能是由于12306检测到同个电脑上有多个异常登录状态存在,或者是访问频次过快导致的
@Bange666 这个网站的试用账号貌似需要隔一段时间就验证一下短信,具体发送状态以它提供的服务为准咯
什么样的座位都接受,是这样写(CHOOSE_SEATS = [])吗?
正在获取验证码..
-----------------
| 0 | 1 | 2 | 3 |
-----------------
| 4 | 5 | 6 | 7 |
-----------------
输入验证码索引(见上图,以','分割): 2
验证码坐标: 191, 24
验证码识别成功
Traceback (most recent call last):
File "fuckeverything.py", line 127, in
又出现这个问题,和getDeviceId相关吗?
@yzjamm 是的,你可以尝试下隔一段时间更新下deviceId。更新代码也可以
现在只能手动输入验证码了吗?命令行执行文件看不到验证码怎么办?
第20次尝试获取验证图片 获取设备指纹失败 获取设备指纹失败 登录失败
不配置车位信息可以吗
为什么我的验证码显示“你刷新的频率太快,请稍后再试”
现在只能手动输入验证码了吗?命令行执行文件看不到验证码怎么办?
解决了吗
@betterbailu @renshihao007 不支持纯服务器版本,你可以尝试使用其它工具的识别算法自动打码
@denghuier 12306从人群中发现了你-_-
@xiaoyv97 更新代码或者自己更改deviceId
现在只能手动输入验证码了吗?命令行执行文件看不到验证码怎么办?
解决了吗
解决了,用Windows运行就可以了,在服务器上不行
Microsoft Windows [版本 6.1.7601] 版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
C:\Users\Administrator>git clone https://github.com/V-I-C-T-O-R/12306.git fatal: 目标路径 '12306' 已经存在,并且不是一个空目录。
Warning: Your console font probably doesn't support Unicode. If you experience s trange characters in the output, consider switching to a TrueType font such as C onsolas!
C:\Users\Administrator>cd 12306
C:\Users\Administrator\12306>ls 'ls' 不是内部或外部命令,也不是可运行的程序 或批处理文件。
C:\Users\Administrator\12306>dir 驱动器 C 中的卷没有标签。 卷的序列号是 6882-05D1
C:\Users\Administrator\12306 的目录
2019/09/14 11:05
C:\Users\Administrator\12306>cd ..
C:\Users\Administrator>rm -rf 12306 'rm' 不是内部或外部命令,也不是可运行的程序 或批处理文件。
C:\Users\Administrator>del 12306 C:\Users\Administrator\12306*, 是否确认(Y/N)? y
C:\Users\Administrator>dir 驱动器 C 中的卷没有标签。 卷的序列号是 6882-05D1
C:\Users\Administrator 的目录
2019/09/15 00:13
C:\Users\Administrator>git clone https://github.com/V-I-C-T-O-R/12306.git 正克隆到 '12306'... remote: Enumerating objects: 199, done. remote: Counting objects: 100% (199/199), done. remote: Compressing objects: 100% (135/135), done. 接remote: Total 572 (delta 136), reused 116 (delta 63), pack-reused 373收对象中: 接收对象中: 100% (572/572), 747.14 KiB | 296.00 KiB/s, 完成.
处理 delta 中: 100% (344/344), 完成.
Warning: Your console font probably doesn't support Unicode. If you experience s trange characters in the output, consider switching to a TrueType font such as C onsolas!
Warning: Your console font probably doesn't support Unicode. If you experience s trange characters in the output, consider switching to a TrueType font such as C onsolas!
C:\Users\Administrator>cd 12306
C:\Users\Administrator\12306>pip install -r requirements.txt Requirement already satisfied: baidu-aip==2.2.11.0 in c:\users\administrator\app data\local\programs\python\python36\lib\site-packages (from -r requirements.txt (line 1)) (2.2.11.0) Collecting beautifulsoup4==4.7.1 (from -r requirements.txt (line 2)) Using cached https://files.pythonhosted.org/packages/1d/5d/3260694a59df0ec52f8 b4883f5d23b130bc237602a1411fa670eae12351e/beautifulsoup4-4.7.1-py3-none-any.whl Requirement already satisfied: certifi==2018.11.29 in c:\users\administrator\app data\local\programs\python\python36\lib\site-packages (from -r requirements.txt (line 3)) (2018.11.29) Requirement already satisfied: chardet==3.0.4 in c:\users\administrator\appdata\ local\programs\python\python36\lib\site-packages (from -r requirements.txt (line 4)) (3.0.4) Requirement already satisfied: cloudpickle==0.6.1 in c:\users\administrator\appd ata\local\programs\python\python36\lib\site-packages (from -r requirements.txt ( line 5)) (0.6.1) Requirement already satisfied: colorama==0.4.1 in c:\users\administrator\appdata \local\programs\python\python36\lib\site-packages (from -r requirements.txt (lin e 6)) (0.4.1) Requirement already satisfied: cycler==0.10.0 in c:\users\administrator\appdata\ local\programs\python\python36\lib\site-packages (from -r requirements.txt (line 7)) (0.10.0) Requirement already satisfied: dask==1.0.0 in c:\users\administrator\appdata\loc al\programs\python\python36\lib\site-packages (from -r requirements.txt (line 8) ) (1.0.0) Requirement already satisfied: decorator==4.3.0 in c:\users\administrator\appdat a\local\programs\python\python36\lib\site-packages (from -r requirements.txt (li ne 9)) (4.3.0) Requirement already satisfied: dill==0.2.8.2 in c:\users\administrator\appdata\l ocal\programs\python\python36\lib\site-packages (from -r requirements.txt (line 10)) (0.2.8.2) Requirement already satisfied: idna==2.8 in c:\users\administrator\appdata\local \programs\python\python36\lib\site-packages (from -r requirements.txt (line 11)) (2.8) Requirement already satisfied: kiwisolver==1.0.1 in c:\users\administrator\appda ta\local\programs\python\python36\lib\site-packages (from -r requirements.txt (l ine 12)) (1.0.1) Requirement already satisfied: lxml==4.3.0 in c:\users\administrator\appdata\loc al\programs\python\python36\lib\site-packages (from -r requirements.txt (line 13 )) (4.3.0) Requirement already satisfied: matplotlib==3.0.2 in c:\users\administrator\appda ta\local\programs\python\python36\lib\site-packages (from -r requirements.txt (l ine 14)) (3.0.2) Requirement already satisfied: multiprocess==0.70.6.1 in c:\users\administrator\ appdata\local\programs\python\python36\lib\site-packages (from -r requirements.t xt (line 15)) (0.70.6.1) Requirement already satisfied: networkx==2.2 in c:\users\administrator\appdata\l ocal\programs\python\python36\lib\site-packages (from -r requirements.txt (line 16)) (2.2) Requirement already satisfied: numpy==1.16.0 in c:\users\administrator\appdata\l ocal\programs\python\python36\lib\site-packages (from -r requirements.txt (line 17)) (1.16.0) Requirement already satisfied: opencv-python==4.0.0.21 in c:\users\administrator \appdata\local\programs\python\python36\lib\site-packages (from -r requirements. txt (line 18)) (4.0.0.21) Requirement already satisfied: Pillow==5.4.1 in c:\users\administrator\appdata\l ocal\programs\python\python36\lib\site-packages (from -r requirements.txt (line 19)) (5.4.1) Requirement already satisfied: prettytable==0.7.2 in c:\users\administrator\appd ata\local\programs\python\python36\lib\site-packages (from -r requirements.txt ( line 20)) (0.7.2) Requirement already satisfied: PyJWT==1.7.1 in c:\users\administrator\appdata\lo cal\programs\python\python36\lib\site-packages (from -r requirements.txt (line 2 1)) (1.7.1) Requirement already satisfied: pyparsing==2.3.1 in c:\users\administrator\appdat a\local\programs\python\python36\lib\site-packages (from -r requirements.txt (li ne 22)) (2.3.1) Requirement already satisfied: PySocks==1.6.8 in c:\users\administrator\appdata\ local\programs\python\python36\lib\site-packages (from -r requirements.txt (line 23)) (1.6.8) Requirement already satisfied: python-dateutil==2.7.5 in c:\users\administrator\ appdata\local\programs\python\python36\lib\site-packages (from -r requirements.t xt (line 24)) (2.7.5) Requirement already satisfied: pytz==2018.9 in c:\users\administrator\appdata\lo cal\programs\python\python36\lib\site-packages (from -r requirements.txt (line 2 5)) (2018.9) Requirement already satisfied: PyWavelets==1.0.1 in c:\users\administrator\appda ta\local\programs\python\python36\lib\site-packages (from -r requirements.txt (l ine 26)) (1.0.1) Requirement already satisfied: requests==2.21.0 in c:\users\administrator\appdat a\local\programs\python\python36\lib\site-packages (from -r requirements.txt (li ne 27)) (2.21.0) Requirement already satisfied: scikit-image==0.14.1 in c:\users\administrator\ap pdata\local\programs\python\python36\lib\site-packages (from -r requirements.txt (line 28)) (0.14.1) Requirement already satisfied: scipy==1.2.0 in c:\users\administrator\appdata\lo cal\programs\python\python36\lib\site-packages (from -r requirements.txt (line 2 9)) (1.2.0) Requirement already satisfied: six==1.12.0 in c:\users\administrator\appdata\loc al\programs\python\python36\lib\site-packages (from -r requirements.txt (line 30 )) (1.12.0) Collecting soupsieve==1.7.1 (from -r requirements.txt (line 31)) Using cached https://files.pythonhosted.org/packages/4f/88/08ff8b9e01ddfc3932b 37988c794ce5751c1b8e3bc760686ad41d0771c78/soupsieve-1.7.1-py2.py3-none-any.whl Requirement already satisfied: threadpool==1.3.2 in c:\users\administrator\appda ta\local\programs\python\python36\lib\site-packages (from -r requirements.txt (l ine 32)) (1.3.2) Requirement already satisfied: toolz==0.9.0 in c:\users\administrator\appdata\lo cal\programs\python\python36\lib\site-packages (from -r requirements.txt (line 3 3)) (0.9.0) Requirement already satisfied: twilio==6.23.1 in c:\users\administrator\appdata\ local\programs\python\python36\lib\site-packages (from -r requirements.txt (line 34)) (6.23.1) Requirement already satisfied: urllib3==1.24.1 in c:\users\administrator\appdata \local\programs\python\python36\lib\site-packages (from -r requirements.txt (lin e 35)) (1.24.1) Requirement already satisfied: pyreadline>=1.7.1 in c:\users\administrator\appda ta\local\programs\python\python36\lib\site-packages (from dill==0.2.8.2->-r requ irements.txt (line 10)) (2.1) Requirement already satisfied: setuptools in c:\users\administrator\appdata\loca l\programs\python\python36\lib\site-packages (from kiwisolver==1.0.1->-r require ments.txt (line 12)) (41.2.0) Installing collected packages: soupsieve, beautifulsoup4 Found existing installation: soupsieve 1.6.2 Uninstalling soupsieve-1.6.2: Successfully uninstalled soupsieve-1.6.2 Found existing installation: beautifulsoup4 4.7.0 Uninstalling beautifulsoup4-4.7.0: Successfully uninstalled beautifulsoup4-4.7.0 Successfully installed beautifulsoup4-4.7.1 soupsieve-1.7.1
C:\Users\Administrator\12306>dir 驱动器 C 中的卷没有标签。 卷的序列号是 6882-05D1
C:\Users\Administrator\12306 的目录
2019/09/15 12:58
C:\Users\Administrator\12306>python fuckeverything.py
Traceback (most recent call last):
File "fuckeverything.py", line 8, in
C:\Users\Administrator\12306>
这个是啥问题?
希望有通过工具抢到票的童鞋,留个名,哈哈!(要是没抢到过,就忽略吧,尴尬......)
请问一下 为什么在官网显示有票,结果用程序抢票时一直在刷票
为什么一直在循环刷票,但是官网显示有余票的
用程序抢票时一直在刷票,测试高铁二等座时会出现这个问题,,火车硬座就没有问题。这是什么原因?
查询到余票后出现submitOrderRequesst: failed错误 是什么原因
@liuchanghaojh 有时候官网显示的有票是假的。。。比如在整点放票的一段时间。高铁二等座因为你选定的座位没有,比如C,D位置,所以一直刷。submitOrderRequesst: failed错误估计是没抢得过人家
这是怎么回事啊
@Miloxing 更新代码,查看下是不是网络问题
我想放到服务器上让他自动跑,但是用百度ai验证码识别不出来,手动输入的话又看不到图片,所以想把验证码图片保存到本地,然后查看图片再手动输入,但是每次下载图片的时候都失败了,不知道有没有什么方法可以保存图片
@gueat 百度AI还是有很大希望自动识别成功的(本地实践过)。如果你想把图片保存在本地的话,本地肯定要有一个接收服务(麻烦了点)。你可以找找互联网上免费的OSS服务或者有API可以调用的存储服务,上传到云上,然后你再在云上看图片或者下载下来。其实要是有能自动识别的服务最好啦,希望对你有用
[32m有效代理:222.189.245.211:9999[39m [32m有效代理:171.11.179.204:9999[39m [32m有效代理:114.249.118.145:9000[39m [32m有效代理:106.110.68.45:61234[39m [32m有效代理:125.62.27.53:3128[39m [32m有效代理:1.199.30.32:9999[39m [32m有效代理:183.129.207.80:21776[39m [32m有效代理:27.43.189.4:9999[39m [32m有效代理:210.26.64.44:3128[39m [32m有效代理:140.143.48.49:1080[39m [34m无效代理:171.37.78.125:9797[39m [34m无效代理:119.123.245.122:9000[39m [34m无效代理:115.53.35.156:9999[39m [32m更新完成[39m [32m有效ip代理数量:71[39m Traceback (most recent call last): File "C:\Python\lib\site-packages\threadpool.py", line 158, in run result = request.callable(*request.args, **request.kwds) File "C:\python\test\12306-15221bf76a8a9ecd02c9facd1342261903686f13\fuckeverything.py", line 56, in super_hero EasyHttp.load_cookies(COOKIE_SAVE_ADDRESS) File "C:\python\test\12306-15221bf76a8a9ecd02c9facd1342261903686f13\net\NetUtils.py", line 37, in load_cookies load_cookiejar.load(cookie_path, ignore_discard=True, ignore_expires=True) File "C:\Python\lib\http\cookiejar.py", line 1793, in load with open(filename) as f: FileNotFoundError: [Errno 2] No such file or directory: 'cookie.txt'
请问楼主,运行程序提示如上,怎么解决呢,我的python版本是3.72
@huanlongbi 你这个是本地环境问题啊,不属于程序的范畴。这边本地python版本是3.5,或许你可以看看windows环境相关和python版本
好的,谢谢
------------------ 原始邮件 ------------------ 发件人: "Victor"notifications@github.com; 发送时间: 2019年9月21日(星期六) 晚上7:04 收件人: "V-I-C-T-O-R/12306"12306@noreply.github.com; 抄送: "Robin Huang"huanlongbi@foxmail.com;"Mention"mention@noreply.github.com; 主题: Re: [V-I-C-T-O-R/12306] 抢到票了,分享下喜悦吧! (#6)
@huanlongbi 你这个是本地环境问题啊,不属于程序的范畴。这边本地python版本是3.5,或许你可以看看windows环境相关和python版本
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
@V-I-C-T-O-R 我知道为什么了,我之前申请的百度AI应用只有图像识别,但是你这个还需要文字ocr,所以到文字那就出错了,重新申请了一个图片文字都有的就行了。。。
@Miloxing 是的,其实配置里面也说了的。祝你好运
正在为您第1次刷票,当前时间为:2019-09-23 22:03:26
'YXE' is not in list
正在为您第1次刷票,当前时间为:2019-09-23 22:03:26
'YXE' is not in list
正在为您第1次刷票,当前时间为:2019-09-23 22:03:26
'YXE' is not in list
正在为您第1次刷票,当前时间为:2019-09-23 22:03:26
'YXE' is not in list
正在为您第1次刷票,当前时间为:2019-09-23 22:03:26
'YXE' is not in list
正在为您第1次刷票,当前时间为:2019-09-23 22:03:26
这是啥情况啊
@dingrutao32 请问你的出发站和终点站是?
@V-I-C-T-O-R 成都-宜宾西
@dingrutao32 宜宾西是新开的站?-_-,更新下代码
6月开的。。最近的没有哇😂
第1次尝试获取验证图片 {'url': 'https://kyfw.12306.cn/passport/captcha/captcha-image?login_site=E&module=login&rand=sjrand&0.5389126254030969', 'method': 'GET', 'response': 'binary', 'Referer': 'https://kyfw.12306.cn/otn/resources/login.html'} 正在获取验证码...
cannot import name '_validate_lengths'
验证码识别错误! 第2次尝试获取验证图片 {'url': 'https://kyfw.12306.cn/passport/captcha/captcha-image?login_site=E&module=login&rand=sjrand&0.5389126254030969', 'method': 'GET', 'response': 'binary', 'Referer': 'https://kyfw.12306.cn/otn/resources/login.html'} 正在获取验证码...
cannot import name '_validate_lengths'
用百度ai识别不出,一直出现这个情况,有啥解决办法吗
@gueat 先测试下手动的话,能不能正常登录,看是否被12306加入了小黑屋。然后再更新deviceId,执行试试
正在登录... 第1次尝试获取验证图片 正在获取验证码...... 验证码识别错误! 第2次尝试获取验证图片 Expecting value: line 1 column 1 (char 0) 获取设备指纹失败,请查询12306设备Id获取url是否需要更新 第3次尝试获取验证图片 Expecting value: line 1 column 1 (char 0) 获取设备指纹失败,请查询12306设备Id获取url是否需要更新
这是啥情况啊,昨天还好好的,突然就变这样了,用的手动识别验证码
希望有通过工具抢到票的童鞋,留个名,哈哈!(要是没抢到过,就忽略吧,尴尬...)