提交 2e1f94db 编写于 作者: X xianping.wen

删除PushBear

上级 823cddae
......@@ -10,7 +10,7 @@
- [x] 准点预售和捡漏
- [x] 智能候补
- [x] 邮件通知
- [x] pushbear通知
- [x] server酱通知
#### 依赖库
- 验证码目前可以本地识别,需要下载模型,放于项目根目录,全部代码来源于此项目 [传送门](https://github.com/zhaipro/easy12306),表示感谢
......@@ -26,13 +26,12 @@
- 非root用户(避免安装和运行时使用了不同环境): `pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt`
#### 项目使用说明
- 可以配置邮箱,配置邮箱的格式在[配置](TickerConfig.py)里面可以看到ex
- 可以配置server酱提醒(推荐)[配置教程](https://www.jianshu.com/p/8d10b5b9c4e3)
- 配置[配置](TickerConfig.py)文件的时候,需注意空格和遵循python语法格式
#### 项目开始
- 服务器启动:
- 修改[配置](TickerConfig.py)文件
- 可以配置邮箱,配置邮箱的格式在[配置](TickerConfig.py)里面可以看到ex
- 可以配置server酱提醒(推荐)[配置教程](https://www.jianshu.com/p/8d10b5b9c4e3)
- 配置[配置](TickerConfig.py)文件的时候,需注意空格和遵循python语法格式
- 运行根目录`sudo python run.py`,即可开始
- 如果你的服务器安装了docker与docker-compose, 那么就可以通过`docker-compose`进行启动,`docker.sh`脚本对此进行了封装,可以通过如下命令进行启动
- 1、`sudo ./docker.sh run` #创建一个镜像并启动容器,如果镜像已经创建过了会直接启动容器。
......@@ -100,6 +99,7 @@
- 目前12306对服务器ip比较敏感,大家还是在自己家里挂着吧
- 自动更换ip软件目前已支持TPLINK和小米路由器,只限家庭网络[点我跳转](https://github.com/testerSunshine/AutoRouterIP)
#### 感谢一下小伙伴对本项目提供的帮助
- @sun7127@126.com
- @ 才
......
......@@ -81,12 +81,6 @@ EMAIL_CONF = {
"host": "",
}
# 是否开启 pushbear 微信提醒, 使用前需要前往 http://pushbear.ftqq.com 扫码绑定获取 send_key 并关注获得抢票结果通知的公众号
PUSHBEAR_CONF = {
"is_pushbear": False,
"send_key": ""
}
# 是否开启 server酱 微信提醒, 使用前需要前往 http://sc.ftqq.com/3.version 扫码绑定获取 SECRET 并关注获得抢票结果通知的公众号
SERVER_CHAN_CONF = {
"is_server_chan": False,
......
......@@ -6,7 +6,6 @@ import requests
from agency.agency_tools import proxy
from config.emailConf import sendEmail
from config.pushbearConf import sendPushBear
from config.serverchanConf import sendServerChan
......@@ -40,13 +39,6 @@ class testAll(unittest.TestCase):
:return:
"""
sendEmail(u"订票小助手测试一下")
def testPushbear(self):
"""
实测pushbear是否可用
:return:
"""
sendPushBear(u"pushbear 微信通知测试一下")
# def testConfig(self):
# """
......
......@@ -8,7 +8,6 @@ import wrapcache
import TickerConfig
from config.TicketEnmu import ticket
from config.emailConf import sendEmail
from config.pushbearConf import sendPushBear
from config.serverchanConf import sendServerChan
from config.urlConf import urls
from inter.ConfirmSingleForQueue import confirmSingleForQueue
......@@ -130,7 +129,6 @@ class queryQueueByAfterNate:
time.sleep(1)
else:
sendEmail(ticket.WAIT_ORDER_SUCCESS)
sendPushBear(ticket.WAIT_ORDER_SUCCESS)
sendServerChan(ticket.WAIT_ORDER_SUCCESS)
raise ticketIsExitsException(ticket.WAIT_AFTER_NATE_SUCCESS)
......
......@@ -4,7 +4,6 @@ import time
from config.TicketEnmu import ticket
from config.emailConf import sendEmail
from config.pushbearConf import sendPushBear
from config.serverchanConf import sendServerChan
from myException.ticketIsExitsException import ticketIsExitsException
from myException.ticketNumOutException import ticketNumOutException
......@@ -44,8 +43,6 @@ class queryOrderWaitTime:
if data and data.get("orderId", ""):
sendEmail(ticket.WAIT_ORDER_SUCCESS.format(
data.get("orderId", "")))
sendPushBear(ticket.WAIT_ORDER_SUCCESS.format(
data.get("orderId", "")))
sendServerChan(ticket.WAIT_ORDER_SUCCESS.format(
data.get("orderId", "")))
raise ticketIsExitsException(ticket.WAIT_ORDER_SUCCESS.format(
......
# -*- coding=utf-8 -*-
from config.emailConf import sendEmail
from config.pushbearConf import sendPushBear
from config.serverchanConf import sendServerChan
from init import select_ticket_info
......@@ -13,10 +12,6 @@ def Email():
sendEmail(u"订票小助手测试一下")
def PushbearConf():
sendPushBear("订票小助手测试一下")
def PushServerChan():
sendServerChan("订票小助手测试一下")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册