From 960c9a01e7aa43f016a8d9dcf58cfaeed271e752 Mon Sep 17 00:00:00 2001 From: YinAoXiong Date: Thu, 17 Oct 2019 01:31:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E9=85=8D=E7=BD=AE=E4=BA=91=E6=89=93=E7=A0=81=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3,=E6=8F=90=E4=BE=9B=E4=BA=91=E6=89=93=E7=A0=81?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + TickerConfig.py | 9 +++++++++ config/urlConf.py | 8 ++++---- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3a3126f..62c2c62 100755 --- a/README.md +++ b/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` diff --git a/TickerConfig.py b/TickerConfig.py index 1649235..f1262ed 100644 --- a/TickerConfig.py +++ b/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" diff --git a/config/urlConf.py b/config/urlConf.py index 19fd252..2a3b5a4 100755 --- a/config/urlConf.py +++ b/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 }, } \ No newline at end of file