Git Product home page Git Product logo

py12306's Introduction

🚂 py12306 购票助手

多账号,多任务购票

前言

今年回家的票明显要难买很多,早早就答应了父母今年的票没问题,到现在一张票没买到,虽然家里已经订了汽车票,让我不用操心,但是想想他们一行还有小孩,心还是很伤的。 这段时间从 12306Bypass 到 testerSunshine 大佬写的 12306,还是没抢到票,索性就自己写了一个,希望也能帮助到更多人

Features

  • 多日期查询余票
  • 自动打码下单
  • 用户状态恢复
  • 电话语音通知
  • 多账号、多任务、多线程支持
  • 单个任务多站点查询
  • Docker 支持
  • 邮件通知

使用

py12306 需要运行 python 3.6 以上版本(其它版本暂未测试)

1. 安装依赖

git clone https://github.com/pjialin/py12306

pip install -r requirements.txt

2. 配置程序

cp env.py.example env.py

自动打码

打码依赖于若快平台,需要先到 http://www.ruokuai.com 注册一个账号后填写到配置中

语音通知

语音验证码使用的是阿里云 API 市场上的一个服务商,需要到 https://market.aliyun.com/products/57126001/cmapi019902.html 购买后将 appcode 填写到配置中

3. 启动前测试

目前提供了一些简单的测试

开始测试 -t

python main.py -t

测试语音通知 -t -n

# 默认不会进行通知测试,要对通知进行测试需要加上 -n 参数 
python main.py -t -n

4. 运行程序

python main.py

Thanks

感谢大佬 testerSunshine,借鉴了部分实现

License

Apache License.

py12306's People

Contributors

pjialin avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.