GitHub ranked first! Free most "strong" 12306 grab votes artifact, programmers no longer have to beg to accelerate the package!

REVIEW New Year back home to grab a ticket yet? Spring Festival has always been difficult to grab votes known, many people began through a variety of software and approaches, hoping to complete the purchase plan. According to the programmer has been "lazy" style of doing things, it would be unwilling to do their own hands, would not directly write a program to save time and effort? Share GitHub BIAOXING twenty thousand "grab votes artifacts" today.

Looking forward, looking forward,

Approaching of the Spring Festival,

However, this time of year,

hardest,

Than a train ticket home.

 

It is reported that,

During the Spring Festival this year,

It sent the national railway passenger trips will increase by 8.0% year on year.

To reach 440 million people,

Even hard, or to return to the home, or to grab a ticket, so this week, with python grab votes on GitHub project, he returned to top the list.

 

The rush tickets Little Helper was born in 2017, is the author Wenxian flat / text first Sen (testerSunshine), the current project has starred nearly 20,000, one can imagine how the urgent desire of programmers is home!

Worst assistant to grab votes, followed by 12306 update

You can see from the update log of the project, the first update of this project is to 2017.5.13, conducted a total of 32 times after the update, most of which are the author, there are some developers to provide support.

This project is basically the wake of feature updates 12306 and update, such as last year's increase in the spring of candidate functions, in the case of advance payment of tickets sold, and so on after the others an automatic refund to make up. The project also joined the function this year.

At present this little helper to grab votes basic support for all major functions of the 12306, including a considerable mail notification, and other intelligent candidates.

             

The rush tickets assistant called the strongest in the history of the assistant to grab votes, the author behind the project provides exchange group, nine group now has seven full, imagine what a powerful force.

Code sentence, only to grab a ticket to go home

Author for this project or lot of hard work, first we look at the author's ideas.

 

 

The idea is not complicated and quite compact.

First you need to download a complete machine learning models automatic identification verification code 12306, the model to be put in the project root directory.

1. model download link:

https://pan.baidu.com/s/1rS155VjweWVWIJogakechA  

Password: bmlm

 

2. git repository download:

https://github.com/testerSunshine/12306model.git

   (1)cd 12306/

   (2)git clone

https://github.com/testerSunshine/12306model.git

 

 

Models requires installation dependencies, as follows:

 

After satisfy dependencies can be installed:

  • root user (multi-python avoid environmental problems):

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

 

  • Non-root user (avoid using a different environment installation and runtime): 

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

Many windows users can not install tensorflow, it can be appropriate to reduce or increase release versions are possible.

Note that, in the process corresponding to the packet if the dependency is missing dependency list given above, simply using pip3 installed separately.

 

And after you can start the project.

The first step: modify the configuration file

# Test mailboxes and server availability sauce, sauce premise server test server is open sauce switch

# configure server can remind sauce (recommended) [Configuration Tutorial] (https://www.jianshu.com/p/8d10b5b9c4e3)

# with python3 or python depends entirely on the time of installation configuration environment variable is python3, the default environment variable to start python3

python3 run.py t

Profile Description (Read instructions carefully!):

# - * - Coding = UTF-8 - * -

# on software configuration instructions, must see! ! !

# Ps: if the candidate is a ticket, you need to verify the consistency of the user by witnesses and active "railway navigate" members can submit alternate requirements, please follow the instructions to complete the witnesses on the railway 12306app verification.

Whether a candidate after about # can continue Jianlou question here: software as a candidate plus automatic leak detection, successful candidates will be stopped if the software to grab votes, sent e-mail notifications, but does not affect you continue Jianlou,

# if this time Jianlou picked up, then, is payment can be successful, that is, Jianlou + candidates, you can maximize the success rate of upgrade to grab votes

# brush votes modes: 1 = 2 = candidate + brush votes brush votes

TICKET_TYPE = 1

# depart (list) "2018-01-06", "2018-01-07"

STATION_DATES = [

    "2020-01-17"

]

# fill in the need to buy the trips (List), "G1353"

# modify trips fill rule, note :( trips logic previously set unchanged) If trips fill is empty, then that same day car trips are all included in the screening return

# does not fill the entire list is empty trips is considered, if not empty, will still judge the trips, which is wrong to write Law [ ""], the correct wording []

STATION_TRAINS = [ "G1120"]

# departure cities such as Shenzhen North, Shenzhen on the search to fill get

FROM_STATION = "Guangzhou"





# Seating (list) a plurality of seats EX:

# "Business Block"

# "first-class seat,"

# "second seat"

# "Principal Block"

# "soft"

# "hard sleeper"

# "hard seat" ,

# "no seat"

# "action lying",

set_type = [ "second-class"]

# when I vote less than passengers, if you choose to submit a priority, the deletion of contacts, and more than the same number of votes in the submission

# BOOL

IS_MORE_TICKET True =

# occupant (list) more passengers EX:

# "Joe Smith",

# "John Doe"

TICKET_PEOPLES = [ ""]

# 12306 login account

the USER = ""

PWD = ""

# Dark room added default time is 5 minutes, this function results in order to prevent the zombies ticket orders have been unsuccessful miss the normal ticket

TICKET_BLACK_LIST_TIME = 5

# automatic coding

IS_AUTO_CODE = True

# 2 set local automatic coding, you need to configure tensorflow and keras library, 3 coding for the cloud, due to the limited cloud a code server resources (as 2h4C the cpu server), please do not malicious requests, or can only shut down the server

# ps: Do not rely on the cloud server resources has been provided to all servers in this students thanked

= 3 AUTO_CODE_TYPE

# cloud set here a code server address, if you have self-built server, you can change yourself

HOST = "120.77.154.140:8000"

REQ_URL = "/ the Verify / Base64 /"

HTTP_TYPE = "HTTP"

# = HOST " 12306.yinaoxiong.cn "# standby server is less stable

# REQ_URL =" / the Verify / Base64 / "

# HTTP_TYPE =" HTTPS "

# mailbox configuration, if successfully grab votes, will be configured to notify you via e-mail

# listed 163

# email : "[email protected]"

# notice_email_list: "[email protected]"

# username: "XXXXX"

# password: "XXXXX

# Host:" smtp.163.com "

# listed qq, qq set up more complex and requires in mailbox -> accounts -> turn smtp service, obtain authorization code == E-mail password

# Email: "[email protected]"

# notice_email_list: "[email protected]"

# username: "XXXXX "

# password:" license key "

# Host:" smtp.qq.com "

EMAIL_CONF = {

    "IS_MAIL": True,

    "Email": "",

    "notice_email_list": "",

    "username": "",

    "password": "",

    "Host": "smtp.qq.com",

}

# whether to open server butter micro letter reminding, need to go to before using the code binding sweep http://sc.ftqq.com/3.version get SECRET and gain public attention to grab votes No result notification

SERVER_CHAN_CONF = {

    "is_server_chan": False,

    "Secret" : ""

}

# is turned cdn query, you can vote in a faster detection is turned on, 2 off

IS_CDN = 1


# single interface is divided into two types, single (unstable) under simulated page 1 automatic leak detection, simulation 2 mono (steady as old dog) the latter train ticket button

ORDER_TYPE = 2

# 1 presale single mode, the whole point of refresh, refresh interval 0.1-0.5S, will then check time, such as 12 of the pre, that script will at 12.00 entire ticket, refresh the line

# 2 is a leak detection, leak detection refresh interval is zero.5-3 seconds, a long time interval, is not easily blocked IP

ORDER_MODEL = 1


# is turned agent, 0 for off, 1 indicates the start

# Turn this feature make sure that when the proxy ip is available, put inside the test fully tested, and then turn on this feature, or may delay the purchase of your valuable time

# Usage:

# 1, under the agency / proxy_list list fill in the proxy ip

# 2, test UnitTest / TestAll / testProxy test whether you can use a proxy

# 3, open proxy ip

IS_PROXY = 0

# ticket pre-sale period put, if a leak detection mode, you can ignore this

OPEN_TIME = "12:59: 50 "

# 1 = use selenium get devicesID

# 2 = use web client / otn / HttpZF / logdevice get devicesId, this algorithm interface may currently be a problem, if the login has 302 instead configuration 1

# 3 = open a browser window crawl headers-Cookies in RAIL_DEVICEID and RAIL_EXPIRATION, this would not have to configure the Selenium

COOKIE_TYPE = 3

# If COOKIE_TYPE = 1, you need to configure chromeDriver path, Download http://chromedriver.storage.googleapis.com/index.html

# chromedriver As long as the large version and configuration version matching chrome on the line

CHROME_PATH = "/ usr / src / App / chromedriver"

# docker37 prepare for environmental change Amount, windows can not control the environment parameter

= CHROME_CHROME_PATH "/ opt / Google / Chrome /-Google Chrome"

# If COOKIE_TYPE = 3, you need to configure RAIL_EXPIRATION, RAIL_DEVICEID value

RAIL_EXPIRATION = "1577033439142"

RAIL_DEVICEID = "PuV16sVaV-CTGsFZUuL8JLAk4OhuT1wgUYC_W3L2JZfWx8Ygx8LOPkko3PSOrK5_xSKhXjgyTMS8dBmj1RZHL2CKBTmVs6UG_yptlB4NJbGHldltrLMTUEgoDpSkpX2vzpGXgMQsTRzgOXfuQkAWwS4GjCxSmV3C; BIGipServerpassport = 820510986.50215.0000; = 9036359bb8a8a461c164a04f8f50b252 route"


# 1 => a straight random ua, 2-> only activated when a random UA

RANDOM_AGENT = 2

PASSENGER_TICKER_STR = {

    'class seat': 'M',

    'Principal Block': 'P',

    'two seat': 'O',

    'business Block': 9

    'seat': 1,

    'no seat': 1,

    'soft seat': 2,

    'Soft': 4

    'hard': 3

}

# 12306 official website request frequency protection provided random request time, the principle of no greater than 5 minutes 80 times

# Maximum time interval request

MAX_TIME. 3 =

# minimum time interval request

MIN_TIME. 1 =

# Software version

RE_VERSION = "1.2.003"

Step Two: Before starting the screening cdn

python3 run.py c

The third step: Start Services

python3 run.py r

After the success of rush tickets will be following the results of it!

 

project address:

https://github.com/testerSunshine/12306

In order to grab tickets programmers are doing it!

Programmers write code to grab votes and it dates back to 12306 just appeared.

In early 2010, the network 12306 tickets just appeared, on GitHub year later, there were already a programmer in order to buy a ticket and write the script, but was limited to a query than votes.

 

Subsequently, more and more programmers began a "home-oriented programming", the biggest news is that almost ruined GitHub.

In 2012, a big brother developed a plugin called iFish, Spring Festival is the version number of the browser have been installed, even the 12306 official also cited a resource inside.

 

This plug-in triggered the notorious "12306 Booking Assistant collapse GitHub" event.

In simple terms, this is the file "booking assistant" is not an ordinary use of static files (such as gist), but a repo of raw data. This means that every time someone requests this file, github have access to this repo, find the data requested.

And, if a data request fails, then the command will be on a request every five seconds, until it succeeds. So grab votes in the ten days before the Spring Festival peak, resulting in a huge amount of access Github by DDOS attacks, unbearable load.

Later the author himself said: Huangde batch.

 

With the emergence of a variety of pay-App after rush tickets, many people would not choose to code a bunch of code just to grab a ticket, but the programmer is always the hearts of obsession will not go out, "home-oriented programming", then tough It is worth it!

Finally, I wish you small partners: in this year's Spring Festival in successfully grab votes, well go home!

12306 Project Portal:

https://github.com/testerSunshine/12306

 

py12306 Project Portal:

https://github.com/pjialin/py12306

 

inventory of sand sculptures 2019 news, so once you laugh your fill!

interview Ali revealed the secret is the hate! Interviewer: This is a look at the resume packed off

most complete IT guide melons for the year 2019

a Pork tell you, undergraduate, master's and doctoral difference is too big!

 

Published 38 original articles · won praise 742 · views 30000 +

Guess you like

Origin blog.csdn.net/cxyshenghuozhi/article/details/103714737