33

屌丝男用这种黑科技到12306网站抢票

 5 years ago
source link: http://www.linuxmysql.com/17/2019/978.htm?amp%3Butm_medium=referral
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

一年一度的春运大战又开始了,原来比找对象更难的事就是抢到一张回家的票。’

E3qYjuB.jpg!web

许多人选择把希望寄托在第三方抢票,但是第三方软件不仅不能保证帮你抢到票,就连个人信息安全都成问题,不信请看前不久的12306用户信息泄露事件

  • 《12306超60万账号泄露?官方回应》
  • 《贩卖 470 余万条 12306 用户数据的人被抓了!》

因此,作为程序员,怎么会把精力放在抢票上呢,与其浪费这时间和精力不如自己写个代码,省时又省力

比如下面要和大家推荐的这个12306只能刷票助手,就是程序员自己写的一个抢票脚本,项目名称就叫——12306

26VZzqA.jpg!web

目前,该项目已经在GitHub上获得 4377 Star,1302 个Fork(GitHub地址: https://github.com/testerSunshine/12306 )

该依赖库的Python版本支持2.7.10 - 2.7.15,其设计思路如下:

UNnEVbr.jpg!web

依赖库

项目依赖包requirements.txt

Windows安装方法:

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt 

Linux安装方法:

  • root用户(避免多python环境产生问题):python2 -m pip install -i

https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt

  • 非root用户(避免安装和运行时使用了不同环境):sudo python2 -m pip install -i

https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt

其他具体使用方法如下:

6ZJJRnu.jpg!web

当然,你也可以自己到GitHub项目详情页仔细查看。

uYJfUjE.gif

ieE3Y37.jpg!web


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK