Skip to content

Commit c5c9450

Browse files
author
文贤平
committed
fix 下单失败问题 testerSunshine#288
1 parent 1d585f5 commit c5c9450

8 files changed

+12
-46
lines changed

GuiHelp.md

-33
This file was deleted.

README.md

+4-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### 12306 购票小助手
22
#### python版本
3-
- [x] 2.7.10 - 2.7.15
3+
- [ ] 2.7.10 - 2.7.15
44
- [x] 3.6 - 3.7.4
55
- [ ] 2.7.9
66

@@ -14,13 +14,12 @@
1414
- 项目依赖包查看 [requirements.txt](requirements.txt)
1515
- 安装方法-Windows:
1616
- 安装方法-Linux:
17-
- root用户(避免多python环境产生问题): `python2 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt`
18-
- 非root用户(避免安装和运行时使用了不同环境): `sudo python2 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt`
17+
- root用户(避免多python环境产生问题): `pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt`
18+
- 非root用户(避免安装和运行时使用了不同环境): `pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt`
1919
2020
#### 项目使用说明
2121
- 可以配置邮箱,可以配置可以不配置,配置邮箱的格式在[yaml](config/ticket_config.yaml)里面可以看到ex
2222
- 可以配置server酱提醒(推荐), [配置教程](https://www.jianshu.com/p/8d10b5b9c4e3)
23-
- 提交订单验证码哪里依赖打码兔,所以如果是订票遇到验证码的时候,没有打码兔是过不了的,不推荐手动,手动太慢
2423
- 配置[yaml](config/ticket_config.yaml)文件的时候,需注意空格和遵循yaml语法格式
2524
2625
#### 项目开始
@@ -44,7 +43,7 @@
4443
#### 目录对应说明
4544
- agency - cdn代理
4645
- config - 项目配置
47-
- damatuCode - 打码兔接口
46+
- damatuCode - 自动打码
4847
- init - 项目主运行目录
4948
- myException - 异常
5049
- myUrllib request网络请求库
@@ -94,10 +93,6 @@
9493
- 测试下单接口是否可用,有两个下单接口,随便用哪个都ok
9594
- 如果下载验证码过期或者下载失败的问题,应该是12306封ip的策略,多重试几次,12306现在封服务器(阿里云和腾讯云)ip比较严重,尽量不要放在服务器里面
9695
- 目前12306对服务器ip比较敏感,大家还是在自己家里挂着吧
97-
- 如果想使用此项目的gui版本,请加群获取链接 [gui文档](GuiHelp.md) 或者,gui专用群:499098551
98-
```
99-
mac gui and windows gui 下载链接:https://pan.baidu.com/s/1SbVJWxiwP27yb8HUi1kzDQ 密码:41wp
100-
```
10196
- 自动更换ip软件目前已支持TPLINK和小米路由器,只限家庭网络[点我跳转](https://github.com/testerSunshine/AutoRouterIP)
10297
- 关于登录接口需要识别DEVICES_ID的情况,可以使用本地打开12306,在任意一接口里面抓取DEVICES_ID,填于[login.py](init/login.py)文件中的141行
10398
- 原来的 d`evicesId = eval(devicesIdRsp.split("(")[1].split(")")[0].replace("'", ""))["dfp"]`

Update.md

+5
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,8 @@
152152
153153
- 2019.04.23更新
154154
- 更新本地识别
155+
156+
- 2019.08.31更新
157+
- 删除若快打码
158+
- 修复不能下单问题
159+
- 放弃支持python2.7,只支持3.6以上版本

init/login.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
# -*- coding=utf-8 -*-
22
import copy
3-
import random
43
import time
54
from collections import OrderedDict
65
from time import sleep
76

87
from config.ticketConf import _get_yaml
9-
from inter.GetPassCodeNewOrderAndLogin import getPassCodeNewOrderAndLogin, getPassCodeNewOrderAndLogin1
8+
from inter.GetPassCodeNewOrderAndLogin import getPassCodeNewOrderAndLogin1
109
from inter.GetRandCode import getRandCode
1110
from inter.LoginAysnSuggest import loginAysnSuggest
1211
from inter.LoginConf import loginConf
@@ -137,7 +136,7 @@ def go_login(self):
137136

138137
devicesIdUrl = copy.deepcopy(self.session.urls["getDevicesId"])
139138
devicesIdUrl["req_url"] = devicesIdUrl["req_url"].format(int(time.time() * 1000))
140-
devicesIdRsp = self.session.httpClint.send(devicesIdUrl)
139+
# devicesIdRsp = self.session.httpClint.send(devicesIdUrl)
141140
# devicesId = eval(devicesIdRsp.split("(")[1].split(")")[0].replace("'", ""))["dfp"]
142141
devicesId = "UysLb2cYwsVjyInSzZ0pGOmYplvokmhBjoGNjrinquaUD0id7gkifgF6FvM2TRCL7Df89GZL1lVV763tGhiPhxlNdlE7iQkk496KUGCFZyyWxE4d0XjyHYv9DlsXfKTlrd8RBUdYIYjmWBXWMN65ElDQiO_Rnrul"
143142

init/select_ticket_info.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def get_ticket_info(self):
9494
is_proxy = ticket_info_config["is_proxy"]
9595

9696
print(u"*" * 50)
97-
print(u"检查当前python版本为:{},目前版本只支持2.7.10-2.7.15".format(sys.version.split(" ")[0]))
97+
print(u"检查当前python版本为:{},目前版本只支持3.6以上".format(sys.version.split(" ")[0]))
9898
print(u"12306刷票小助手,最后更新于2019.01.08,请勿作为商业用途,交流群号:286271084(已满),"
9999
u" 2群:649992274(已满)\n"
100100
u" 3群:632501142(已满)\n"

tkcode.png

3.14 KB
Loading

uml/mac1.png

-403 KB
Binary file not shown.

uml/mac2.png

-147 KB
Binary file not shown.

0 commit comments

Comments
 (0)