forked from testerSunshine/12306
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master'
# Conflicts: # config/ticket_config.yaml
- Loading branch information
Showing
2 changed files
with
26 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
### 12306 购票小助手 | ||
#### python版本 | ||
- [x] 2.7.10 - 2.7.15 | ||
- [x] 3.6 | ||
- [x] 3.6 - 3.7.4 | ||
- [ ] 2.7.9 | ||
|
||
#### 依赖库 | ||
- 验证码目前可以本地识别,需要下载模型,放于项目更目录,全部代码来源于此项目 [传送门](https://github.com/zhaipro/easy12306),表示感谢 | ||
- 验证码目前可以本地识别,需要下载模型,放于项目根目录,全部代码来源于此项目 [传送门](https://github.com/zhaipro/easy12306),表示感谢 | ||
``` | ||
PS: | ||
1. 模型下载链接:https://pan.baidu.com/s/1rS155VjweWVWIJogakechA 密码:bmlm | ||
群里面也可以下载 | ||
``` | ||
- 项目依赖包查看 requirements.txt | ||
- 项目依赖包查看 [requirements.txt](requirements.txt) | ||
- 安装方法-Windows: | ||
- 安装方法-Linux: | ||
- root用户(避免多python环境产生问题): python2 -m pip install -i https://pypi.tuna.tsinghua.e -r requirements.txt | ||
- 非root用户(避免安装和运行时使用了不同环境): sudo python2 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt | ||
- root用户(避免多python环境产生问题): `python2 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt` | ||
- 非root用户(避免安装和运行时使用了不同环境): `sudo python2 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt` | ||
#### 项目使用说明 | ||
- 可以配置邮箱,可以配置可以不配置,配置邮箱的格式在yaml里面可以看到ex | ||
- 可以配置server酱提醒(推荐), [配置教程] (https://www.jianshu.com/p/8d10b5b9c4e3) | ||
- 可以配置邮箱,可以配置可以不配置,配置邮箱的格式在[yaml](config/ticket_config.yaml)里面可以看到ex | ||
- 可以配置server酱提醒(推荐), [配置教程](https://www.jianshu.com/p/8d10b5b9c4e3) | ||
- 提交订单验证码哪里依赖打码兔,所以如果是订票遇到验证码的时候,没有打码兔是过不了的,不推荐手动,手动太慢 | ||
- 配置yaml文件的时候,需注意空格和遵循yaml语法格式 | ||
- 配置[yaml](config/ticket_config.yaml)文件的时候,需注意空格和遵循yaml语法格式 | ||
#### 项目开始 | ||
- 服务器启动: | ||
- 修改config/ticket_config.yaml文件,按照提示更改自己想要的信息 | ||
- 运行根目录sudo python run.py,即可开始 | ||
- 由于新增对时功能,请务必用sudo,sudo,sudo 执行,否则会报权限错误,windows打开ide或者cmd请用管理员身份执行python run.py,不需要加sudo | ||
- 修改[config/ticket_config.yaml](config/ticket_config.yaml)文件,按照提示更改自己想要的信息 | ||
- 运行根目录`sudo python run.py`,即可开始 | ||
- 由于新增对时功能,请务必用**sudo,sudo,sudo** 执行,否则会报权限错误,windows打开ide或者cmd请用管理员身份执行`python run.py`,不需要加`sudo` | ||
- 如果你的服务器安装了docker与docker-compose, 那么就可以通过`docker-compose`进行启动,`docker.sh`脚本对此进行了封装,可以通过如下命令进行启动 | ||
- 1、`sudo ./docker.sh run` #创建一个镜像并启动容器,如果镜像已经创建过了会直接启动容器。 | ||
- 2、`sudo ./docker.sh restart` #修改配置文件后,通过此名命令可重新加载容器运行 | ||
|
@@ -50,7 +50,7 @@ | |
- myUrllib request网络请求库 | ||
#### 思路图 | ||
-  | ||
-  | ||
#### 项目声明: | ||
- 本软件只供学习交流使用,勿作为商业用途,交流群号 | ||
|
@@ -99,11 +99,10 @@ | |
mac gui and windows gui 下载链接:https://pan.baidu.com/s/1SbVJWxiwP27yb8HUi1kzDQ 密码:41wp | ||
``` | ||
- 自动更换ip软件目前已支持TPLINK和小米路由器,只限家庭网络[点我跳转](https://github.com/testerSunshine/AutoRouterIP) | ||
- 关于登录接口需要识别DEVICES_ID的情况,可以使用本地打开12306,在任意一接口里面抓取DEVICES_ID,填于login.py文件中的141行 | ||
- `原来的 devicesId = eval(devicesIdRsp.split("(")[1].split(")")[0].replace("'", ""))["dfp"]` | ||
- `更换为 devicesId = 刚才抓取的DEVICES_ID填上即可` | ||
- 浏览器截图 | ||
 | ||
- 关于登录接口需要识别DEVICES_ID的情况,可以使用本地打开12306,在任意一接口里面抓取DEVICES_ID,填于[login.py](init/login.py)文件中的141行 | ||
- 原来的 d`evicesId = eval(devicesIdRsp.split("(")[1].split(")")[0].replace("'", ""))["dfp"]` | ||
- 更换为 `devicesId = 刚才抓取的DEVICES_ID`,填上即可 | ||
- 浏览器截图 | ||
#### 感谢一下小伙伴对本项目提供的帮助 | ||
- @[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters