Browse Source

使用配置文件配置云打码接口,提供云打码服务代码

pull/460/head
YinAoXiong 5 years ago
parent
commit
960c9a01e7
  1. 1
      README.md
  2. 9
      TickerConfig.py
  3. 8
      config/urlConf.py

1
README.md

@ -20,6 +20,7 @@
群里面也可以下载
2. git仓库下载:https://github.com/testerSunshine/12306model.git
```
- 自托管云打码服务器搭建:[12306_code_server](https://github.com/YinAoXiong/12306_code_server)
- 项目依赖包查看 [requirements.txt](requirements.txt)
- 安装方法x:
- root用户(避免多python环境产生问题): `pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt`

9
TickerConfig.py

@ -57,6 +57,15 @@ IS_AUTO_CODE = True
# ps: 请不要一直依赖云服务器资源,在此向提供服务器的"do it"同学表示感谢
AUTO_CODE_TYPE = 3
HOST="34.97.127.118:8000"
REQ_URL="/verify/base64/"
HTTP_TYPE="http"
# HOST="12306.yinaoxiong.cn" #备用服务器稳定性较差
# REQ_URL="/verify/base64/"
# HTTP_TYPE="https"
# 邮箱配置,如果抢票成功,将通过邮件配置通知给您
# 列举163
# email: "xxx@163.com"

8
config/urlConf.py

@ -1,6 +1,6 @@
# coding=utf-8
import random
import TickerConfig
import time
urls = {
@ -588,15 +588,15 @@ urls = {
},
"autoVerifyImage": { # 云打码接口
"req_url": "/verify/base64/",
"req_url": TickerConfig.REQ_URL,
"req_type": "post",
"Referer": "",
"Host": "34.97.127.118:8000",
"Host": TickerConfig.HOST,
"re_try": 6,
"re_time": 10,
"s_time": 0.001,
"is_logger": True,
"is_json": True,
"httpType": "http"
"httpType": TickerConfig.HTTP_TYPE
},
}
Loading…
Cancel
Save