GithubHelp home page GithubHelp logo

12306's Introduction

12306

鉴于2019年12306更新了抢票规则和候补策略,不管能不能帮助抢到票,都希望本工具能作为一个单点买票工具为大家在抢票思路上能做个参考

Usage

  1. pip install -r requirements.txt安装所有依赖(Python3)

  2. configure.py中配置信息:

  • 身份信息
  • 车票信息
  • 订票策略
  • 邮件配置
  • 短信配置
  • 线程池/进程池策略
  • IP池策略
  • 识别验证码策略
  1. 执行funckeverything.py
(ps:如果有登录验证失败次数过多,可以尝试自己抓deviceId Url来更新urls_conf.py文件中的getDevicesId对应的url。此外除了手动更改之外,可以替换train/login/Login.py中的_login_init方法中的self._handle_device_code_manual为self._handle_device_code_auto自动获取设备指纹。注:自动获取设备指纹方法容易引起12306拦截,请测试执行)
希望用工具抢到票的童鞋可以留个足迹,以资鼓励,发布地址:issue

Notice

  • 鉴于本工具就是个工具,直接再做一个CNN类的训练服务不大实际(穷->服务器<=0),所以就折中选择了免费服务自己捣鼓,希望对其他人会有启发
  • 捣鼓了一个自动识别验证码的机制,当前还不是很成熟,有需要的可以酌情修改。 当前依赖百度图像识别工具/Tencent图像识别工具,免费次数有限,你懂的
  • 如果要使用捣鼓方式,请自行注册使用Baidu/Tencent AI服务
  • 刷票频次最好不要太快,但是整点发售0.2秒最佳,网速不好,延迟大还真抢不过,哈哈
  • 代码规范暂不是很好,请忽略-_-
  • IP池和登录方式酌情修改,短信发送twilio使用说明
  • 有坑必踩,都是为了回家
  • 配置详情请关注configure.py文件

你可以做啥

  • 要改成多线程多进程随你咯

  • 添加自己的代理池随你咯

  • 添加多账户支持随你咯

  • 方便个人,不为盈利

  • oh! 对了,现在是2020年了,一般人就只能费点钱买服务买票捡漏了,加油!

    买个票真不容易...

效果图如下: 买票
12306-1 12306-2

短信
sms

提示
  • 借鉴了EasyTrain库的代码
  • 借鉴了proxy_pool库的代码
  • 借鉴了其他开源代码
  • 优化当前代码和流程

12306's People

Contributors

v-i-c-t-o-r avatar zhoumh1988 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.