V-I-C-T-O-R / 12306

12306买票小工具
MIT License
676 stars 220 forks source link

抢到票了,分享下喜悦吧! #6

Open V-I-C-T-O-R opened 5 years ago

V-I-C-T-O-R commented 5 years ago

希望有通过工具抢到票的童鞋,留个名,哈哈!(要是没抢到过,就忽略吧,尴尬...)

V-I-C-T-O-R commented 5 years ago

@ericline 自动识别验证码免费接口当前废了,修改验证方式为手动输入就可以了

StoneRicky commented 5 years ago

@V-I-C-T-O-R 好的,谢谢回复啦

Neuropathy1 commented 5 years ago

请问一下为什么余票充足的情况下会出现这种情况呀,显示订单提交成功但是我去12306上查不到订单

第8次访问12306网站

正在为您第1次刷票,当前时间为:2019-05-11 08:50:49 C5010 二等座: 有 已为您查询到可用余票:[车次:C5010,出发站:庙山,到达站:武昌,出发时间:20:07,到达时间:20:31] 提交订单请求成功! 获取乘客信息成功!

'NoneType' object has no attribute 'passengerName'

zhubery commented 5 years ago

提交订单请求成功! 获取乘客信息成功! 校验订单信息成功! K2058 剩余车票:573,440 ,目前排队人数: 0 confirmSingleOrGoForQueue: 出票失败!

https://blog.csdn.net/weixin_34357436/article/details/86866770,12306下单流程解析 发现这个问题是座位选择引起的,在座位选择里不传入参数就能正常出票。

K2058 剩余车票:156 ,目前排队人数: 0 正在排队获取订单! [1]正在等待订单提交结果... 订单提交成功,订单号: E807970165 您已成功订购火车票!请在30分钟内前往12306官方网站进行支付!  None  注销登录成功

不能发送邮件通知通常会是什么原因?

V-I-C-T-O-R commented 5 years ago

@zhubery 看你具体是怎么配置,还有具体异常

wufu-fire commented 5 years ago

name 'Image' is not defined

V-I-C-T-O-R commented 5 years ago

@xuanGetit 本地没出现你表述的问题,依赖包要安装好

wufu-fire commented 5 years ago

@xuanGetit 本地没出现你表述的问题,依赖包要安装好

遇到新问题了 第1次尝试获取验证图片 识别坐标:182,113,254,126 验证码识别成功 Traceback (most recent call last): File "fuckeverything.py", line 127, in main() File "fuckeverything.py", line 48, in main status,login = do_login() File "fuckeverything.py", line 23, in do_login result, msg = login.login(USER_NAME, USER_PWD, SELECT_AUTO_CHECK_CAPTHCA) File "/Users/wangxuan/repositories/12306/train/login/Login.py", line 85, in login result, msg = self._login(userName, userPwd, autoCheck, type = 0) File "/Users/wangxuan/repositories/12306/train/login/Login.py", line 20, in wrapper reslut, msg = func(*args, kw) File "/Users/wangxuan/repositories/12306/train/login/Login.py", line 96, in _login return self._loginNormal(userName, userPwd,autoCheck, type) File "/Users/wangxuan/repositories/12306/train/login/Login.py", line 126, in _loginNormal result, msg = isLoginSuccess(response.json()) File "/Users/wangxuan/.pyenv/versions/3.6.8/lib/python3.6/site-packages/requests/models.py", line 897, in json return complexjson.loads(self.text, kwargs) File "/Users/wangxuan/.pyenv/versions/3.6.8/lib/python3.6/json/init.py", line 354, in loads return _default_decoder.decode(s) File "/Users/wangxuan/.pyenv/versions/3.6.8/lib/python3.6/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/Users/wangxuan/.pyenv/versions/3.6.8/lib/python3.6/json/decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

wufu-fire commented 5 years ago

用你的最新代码,已经OK了,谢谢

V-I-C-T-O-R commented 5 years ago

@xuanGetit 12306有个device_id会每次更新,但是对应的JS写的稀里糊涂,破解有点惨不忍睹。你有兴趣可以去试试

wangqianb commented 5 years ago

提交订单请求成功! 获取乘客信息成功! 校验订单信息成功! 2590 剩余车票:371,299 ,目前排队人数: 6 confirmSingleOrGoForQueue: 非法的订票请求! 第33次访问12306网站

正在为您第1次刷票,当前时间为:2019-05-31 16:01:40 2590 硬座: 有

wangqianb commented 5 years ago

请问这个是什么原因(confirmSingleOrGoForQueue: 非法的订票请求!),谢谢!!

Bange666 commented 5 years ago

成功了,就是不知道为什么短信没收到。那个短信网站上也显示发出来了,号码也没错,第一次的test短信也收到了。明天再试一试用自动识别

V-I-C-T-O-R commented 5 years ago

@wangqianb 这个可能是由于12306检测到同个电脑上有多个异常登录状态存在,或者是访问频次过快导致的

V-I-C-T-O-R commented 5 years ago

@Bange666 这个网站的试用账号貌似需要隔一段时间就验证一下短信,具体发送状态以它提供的服务为准咯

wangqianb commented 5 years ago

什么样的座位都接受,是这样写(CHOOSE_SEATS = [])吗?

yzjamm commented 5 years ago

正在获取验证码..

            -----------------
            | 0 | 1 | 2 | 3 |
            -----------------
            | 4 | 5 | 6 | 7 |
            -----------------

输入验证码索引(见上图,以','分割): 2 验证码坐标: 191, 24 验证码识别成功 Traceback (most recent call last): File "fuckeverything.py", line 127, in main() File "fuckeverything.py", line 48, in main status,login = do_login() File "fuckeverything.py", line 23, in do_login result, msg = login.login(USER_NAME, USER_PWD, SELECT_AUTO_CHECK_CAPTHCA) File "/12306/train/login/Login.py", line 85, in login result, msg = self._login(userName, userPwd, autoCheck, type = 0) File "/12306/train/login/Login.py", line 20, in wrapper reslut, msg = func(*args, kw) File "/12306/train/login/Login.py", line 96, in _login return self._loginNormal(userName, userPwd,autoCheck, type) File "/12306/train/login/Login.py", line 126, in _loginNormal result, msg = isLoginSuccess(response.json()) File "/usr/local/lib/python3.6/site-packages/requests/models.py", line 897, in json return complexjson.loads(self.text, kwargs) File "/usr/local/lib/python3.6/json/init.py", line 354, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.6/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/lib/python3.6/json/decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

又出现这个问题,和getDeviceId相关吗?

"getDevicesId": { # 获取用户信息 "url": "https://kyfw.12306.cn/otn/HttpZF/logdevice?algID=Dew0aHUwP4&hashCode=LeJCNs9SIkCxa_w4OxoOudaTAmGILGoFICzS_FfPHdk&FMQw=1&q4f3=zh-CN&VPIf=1&custID=133&VEek=unknown&dzuS=0&yD16=0&EOQP=382b3eb7cfc5d30f1b59cb283d1acaf3&lEnu=3232235885&jp76=52d67b2a5aa5e031084733d5006cc664&hAqN=Linux%20x86_64&platform=WEB&ks0Q=d22ca0b81584fbea62237b14bd04c866&TeRS=1003x1920&tOHY=24xx1080x1920&Fvje=i1l1o1s1&q5aJ=-8&wNLf=99115dfb07133750ba677d055874de87&0aew=Mozilla/5.0%20(X11;%20Linux%20x86_64)%20AppleWebKit/537.36%20(KHTML,%20like%20Gecko)%20Chrome/74.0.3729.157%20Safari/537.36&E3gR=df296f685180ae0f18b783d47b88b562&timestamp=",

V-I-C-T-O-R commented 5 years ago

@yzjamm 是的,你可以尝试下隔一段时间更新下deviceId。更新代码也可以

renshihao007 commented 5 years ago

现在只能手动输入验证码了吗?命令行执行文件看不到验证码怎么办?

xiaoyv97 commented 5 years ago

第20次尝试获取验证图片 获取设备指纹失败 获取设备指纹失败 登录失败

xiaoyv97 commented 5 years ago

不配置车位信息可以吗

denghuier commented 5 years ago

360截图20190907020909190 为什么我的验证码显示“你刷新的频率太快,请稍后再试”

betterbailu commented 5 years ago

现在只能手动输入验证码了吗?命令行执行文件看不到验证码怎么办?

解决了吗

V-I-C-T-O-R commented 5 years ago

@betterbailu @renshihao007 不支持纯服务器版本,你可以尝试使用其它工具的识别算法自动打码

V-I-C-T-O-R commented 5 years ago

@denghuier 12306从人群中发现了你-_-

V-I-C-T-O-R commented 5 years ago

@xiaoyv97 更新代码或者自己更改deviceId

renshihao007 commented 5 years ago

现在只能手动输入验证码了吗?命令行执行文件看不到验证码怎么办?

解决了吗

解决了,用Windows运行就可以了,在服务器上不行

lhpmain commented 5 years ago

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

. 2019/09/14 11:05 .. 2019/09/14 10:48 92 .dockerignore 2019/09/14 10:48 .github 2019/09/14 10:48 48 .gitignore 2019/09/14 10:48 60,152,144 12306.image.model.h5 2019/09/14 11:05 agency 2019/09/14 10:48 28,654 cdn_list 2019/09/14 11:05 config 2019/09/14 10:48 274 docker-compose.yml 2019/09/14 10:48 630 docker.sh 2019/09/14 10:48 802 Dockerfile 2019/09/14 10:48 1,006 docker_install_centos.sh 2019/09/14 11:05 init 2019/09/14 11:05 inter 2019/09/14 10:48 1,075 LICENSE 2019/09/14 10:48 667,568 model.v2.0.h5 2019/09/14 11:05 myException 2019/09/14 11:05 myUrllib 2019/09/14 10:48 5,785 README.md 2019/09/14 10:48 260 requirements.txt 2019/09/14 10:48 430 run.py 2019/09/14 10:48 96,669 station_name.txt 2019/09/14 11:04 4,455 TickerConfig.py 2019/09/14 10:48 13,988 tkcode.png 2019/09/14 10:48 tmp 2019/09/14 10:48 uml 2019/09/14 10:48 UnitTest 2019/09/14 10:48 7,385 Update.md 2019/09/14 11:05 verify 2019/09/14 10:48 0 init.py 2019/09/14 11:05 pycache 18 个文件 60,981,265 字节 14 个目录 24,980,537,344 可用字节

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

. 2019/09/15 00:13 .. 2019/08/18 21:53 2,199 .bash_history 2019/09/15 00:13 1,139 .git-credentials 2019/08/17 19:58 296 .gitconfig 2019/09/14 11:05 .keras 2019/08/10 23:38 .kube 2019/09/14 20:03 .matplotlib 2019/09/14 13:08 .PyCharm2019.1 2019/02/21 21:41 .ssh 2019/09/15 12:58 12306 2019/01/23 22:52 Contacts 2019/08/11 18:58 contos7_ipsec 2019/09/15 12:52 Desktop 2019/08/02 20:15 Documents 2019/09/15 08:46 Downloads 2019/01/23 22:50 Favorites 2019/08/06 00:04 freenom 2019/08/02 22:05 frp 2019/09/15 00:10 ibm-centos6-python3 2019/09/14 22:00 ibm-centos6-ssh-ssr 2019/03/13 20:50 2,257,621 IS903SZQ064-4Z09-TB 14X46.5MM.rar 2019/01/23 22:50 Links 2019/08/17 10:46 Music 2019/01/23 22:50 Pictures 2019/09/14 20:17 py12306 2019/09/14 12:48 PycharmProjects 2019/01/23 22:50 Saved Games 2019/01/23 22:50 Searches 2019/08/11 18:23 sig-cloud-instance-images 2019/01/23 22:50 Videos 4 个文件 2,261,255 字节 27 个目录 25,042,587,648 可用字节

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

. 2019/09/15 12:58 .. 2019/09/15 12:58 .github 2019/09/15 12:58 1,332 .gitignore 2019/09/15 12:58 151,112 1.png 2019/09/15 12:58 222,269 3.jpg 2019/09/15 12:58 conf 2019/09/15 12:55 2,701 configure.py 2019/09/15 12:58 18 cookie.txt 2019/09/15 12:58 define 2019/09/15 12:58 7,581 fuckeverything.py 2019/09/15 12:58 58,368 ip.db 2019/09/15 12:58 1,084 LICENSE 2019/09/15 12:58 net 2019/09/15 12:58 3,170 ReadMe.md 2019/09/15 12:58 612 requirements.txt 2019/09/15 12:58 spider 2019/09/15 12:58 train 2019/09/15 12:58 utils 10 个文件 448,247 字节 9 个目录 25,040,932,864 可用字节

C:\Users\Administrator\12306>python fuckeverything.py Traceback (most recent call last): File "fuckeverything.py", line 8, in from configure import * File "C:\Users\Administrator\12306\configure.py", line 32 CHOOSE_SEATS = [1A] ^ SyntaxError: invalid syntax

C:\Users\Administrator\12306>

这个是啥问题?

liuchanghaojh commented 5 years ago

希望有通过工具抢到票的童鞋,留个名,哈哈!(要是没抢到过,就忽略吧,尴尬......)

请问一下 为什么在官网显示有票,结果用程序抢票时一直在刷票

liuchanghaojh commented 5 years ago

为什么一直在循环刷票,但是官网显示有余票的

liuchanghaojh commented 5 years ago

用程序抢票时一直在刷票,测试高铁二等座时会出现这个问题,,火车硬座就没有问题。这是什么原因?

liuchanghaojh commented 5 years ago

查询到余票后出现submitOrderRequesst: failed错误 是什么原因

V-I-C-T-O-R commented 5 years ago

@liuchanghaojh 有时候官网显示的有票是假的。。。比如在整点放票的一段时间。高铁二等座因为你选定的座位没有,比如C,D位置,所以一直刷。submitOrderRequesst: failed错误估计是没抢得过人家

Miloxing commented 5 years ago

这是怎么回事啊 CA6085A2-A7F1-4762-8A81-7F923D78AF29

V-I-C-T-O-R commented 5 years ago

@Miloxing 更新代码,查看下是不是网络问题

gueat commented 5 years ago

我想放到服务器上让他自动跑,但是用百度ai验证码识别不出来,手动输入的话又看不到图片,所以想把验证码图片保存到本地,然后查看图片再手动输入,但是每次下载图片的时候都失败了,不知道有没有什么方法可以保存图片

V-I-C-T-O-R commented 5 years ago

@gueat 百度AI还是有很大希望自动识别成功的(本地实践过)。如果你想把图片保存在本地的话,本地肯定要有一个接收服务(麻烦了点)。你可以找找互联网上免费的OSS服务或者有API可以调用的存储服务,上传到云上,然后你再在云上看图片或者下载下来。其实要是有能自动识别的服务最好啦,希望对你有用

huanlongbi commented 5 years ago

有效代理:222.189.245.211:9999 有效代理:171.11.179.204:9999 有效代理:114.249.118.145:9000 有效代理:106.110.68.45:61234 有效代理:125.62.27.53:3128 有效代理:1.199.30.32:9999 有效代理:183.129.207.80:21776 有效代理:27.43.189.4:9999 有效代理:210.26.64.44:3128 有效代理:140.143.48.49:1080 无效代理:171.37.78.125:9797 无效代理:119.123.245.122:9000 无效代理:115.53.35.156:9999 更新完成 有效ip代理数量:71 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

V-I-C-T-O-R commented 5 years ago

@huanlongbi 你这个是本地环境问题啊,不属于程序的范畴。这边本地python版本是3.5,或许你可以看看windows环境相关和python版本

huanlongbi commented 5 years ago

好的,谢谢

------------------ 原始邮件 ------------------ 发件人: "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.

Miloxing commented 5 years ago

@V-I-C-T-O-R 我知道为什么了,我之前申请的百度AI应用只有图像识别,但是你这个还需要文字ocr,所以到文字那就出错了,重新申请了一个图片文字都有的就行了。。。

V-I-C-T-O-R commented 5 years ago

@Miloxing 是的,其实配置里面也说了的。祝你好运

dingrutao32 commented 5 years ago

正在为您第1次刷票,当前时间为:2019-09-23 22:03:26

'YXE' is not in list

第40次访问12306网站

正在为您第1次刷票,当前时间为:2019-09-23 22:03:26

'YXE' is not in list

第41次访问12306网站

正在为您第1次刷票,当前时间为:2019-09-23 22:03:26

'YXE' is not in list

第42次访问12306网站

正在为您第1次刷票,当前时间为:2019-09-23 22:03:26

'YXE' is not in list

第43次访问12306网站

正在为您第1次刷票,当前时间为:2019-09-23 22:03:26

'YXE' is not in list

第44次访问12306网站

正在为您第1次刷票,当前时间为:2019-09-23 22:03:26

这是啥情况啊

V-I-C-T-O-R commented 4 years ago

@dingrutao32 请问你的出发站和终点站是?

dingrutao32 commented 4 years ago

@V-I-C-T-O-R 成都-宜宾西

V-I-C-T-O-R commented 4 years ago

@dingrutao32 宜宾西是新开的站?-_-,更新下代码

dingrutao32 commented 4 years ago

6月开的。。最近的没有哇😂

gueat commented 4 years ago

第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识别不出,一直出现这个情况,有啥解决办法吗

V-I-C-T-O-R commented 4 years ago

@gueat 先测试下手动的话,能不能正常登录,看是否被12306加入了小黑屋。然后再更新deviceId,执行试试

gueat commented 4 years ago

正在登录... 第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是否需要更新

这是啥情况啊,昨天还好好的,突然就变这样了,用的手动识别验证码