pull/42/head
wenxianping 2018-08-31 10:15:04 +08:00
parent cbec16c509
commit a3d4fed532
5 changed files with 8 additions and 8 deletions

2
.gitignore vendored
View File

@ -2,4 +2,4 @@
*.pyc
*.yaml
*.log
idea/
.idea/

View File

@ -31,7 +31,7 @@
- 本软件只供学习交流使用务作为商业用途交流群286271084
- 能为你抢到一张回家的票,是我最大的心愿
- 成功log如果是购票失败的请带上失败的log给我我尽力帮你,也可加群一起交流,程序只是加速买票的过程,并不一定能买到票
- 成功log如果是购票失败的请带上失败的log给我我尽力帮你,也可加群一起交流,程序只是加速买票的过程,并不一定能买到票
```
正在第355次查询 乘车日期: 2018-02-12 车次G4741,G2365,G1371,G1377,G1329 查询无票 代理设置 无 总耗时429ms
车次: G4741 始发车站: 上海 终点站: 邵阳 二等座:有

View File

@ -26,7 +26,7 @@ set:
- ""
# 12306登录账号
12306account:
- uesr: ""
- user: ""
- pwd: ""
select_refresh_interval: 1
@ -42,7 +42,7 @@ auto_code_type: 2
# 打码平台账号
auto_code_account:
uesr: ""
user: ""
pwd: ""
# 邮箱配置,如果抢票成功,将通过邮件配置通知给您

View File

@ -115,10 +115,10 @@ class GoLogin:
:return:
"""
if self.is_auto_code and self.auto_code_type == 1:
balance = DamatuApi(_get_yaml()["auto_code_account"]["uesr"], _get_yaml()["auto_code_account"]["pwd"]).getBalance()
balance = DamatuApi(_get_yaml()["auto_code_account"]["user"], _get_yaml()["auto_code_account"]["pwd"]).getBalance()
if int(balance) < 40:
raise balanceException(u'余额不足,当前余额为: {}'.format(balance))
user, passwd = _get_yaml()["set"]["12306acount"][0]["uesr"], _get_yaml()["set"]["12306account"][1]["pwd"]
user, passwd = _get_yaml()["set"]["12306account"][0]["user"], _get_yaml()["set"]["12306account"][1]["pwd"]
if not user or not passwd:
raise UserPasswordException(u"温馨提示: 用户名或者密码为空,请仔细检查")
login_num = 0

4
run.py
View File

@ -7,10 +7,10 @@ def run():
select_ticket_info.select().main()
def testEmail():
def Email():
sendEmail(u"订票小助手测试一下")
if __name__ == '__main__':
run()
# testEmail()
# Email()