Technology House-my online ticket grabbing strategy

Source: Internet
Author: User
Tags creative commons attribution

Preface
Write this articleArticleThe reason is that when I bought a train ticket on June 12306, I was shocked by this awesome website. Thanks to this, it is a good user experience. Let's talk about how I used a small tool to help, and I was lucky enough to get my berth pass home. I hope to give a reference to the brothers in need.

Looking back at the entire online ticket purchase process today, there are four difficulties. The first is login, the second is reservation, the third is order submission, and the fourth is payment. The purpose of this article is to provide some help on the first and second levels.

Preparations:

1. Firefox

2. greasemonkey extension for the oil monkey script

(Some garden friends reflect that they do not understand what they mean here. Okay, I 'd like to add a special article. Greasemonkey is a Firefox extension. Of course, don't ask me what the extension is. please google it on your own. Simply put, you can run some JS scripts based on this extension, make some modifications to the page ...,)

Go to this page to download extensions, https://addons.mozilla.org/zh-cn/firefox/addon/greasemonkey,

A local xpi file is downloaded. drag it into Firefox to complete the extension installation. It takes effect after Firefox is restarted and greasemonkey is enabled.

3, go to this page to install the 12306 train ticket buyer script, http://userscripts.org/scripts/show/122334

(After completing the second step, you can directly open the above link in Firefox. There is a "Install" button on the page. After clicking it, the script is installed in the oil monkey)

Next we will start to experience the entire ticket purchase process. After installing the above oil monkey script in the Firefox browser, first open the login page, http://www.12306.cn/mormhweb/kyfw/, then you will find the following area on the page

 

If you do not see it, please remember to confirm itGreasemonkeyIf the extension has been enabled, just click the monkey on the rightmost side of the address bar and remember to light it up.

 

OK. Next we will introduce the function of this script. It provides some auxiliary functions for us, such as the first and second levels. Function 1: log on to the Assistant (automatically fill in the user name and password, the verification code input box automatically obtains the focus. You do not need to touch the mouse to enter the verification code and press enter to repeat the login). Function 2: automatically query tickets (automatically query the origin site information according to the user's preconfigured arrival information)

First, let's talk about the first level-login. It's hard to log in every day when you place a ticket on the hour. Every time the following window appears, nima won't even have a chance to log in...

 

 

What's worse, if you use IE, the password will be cleared, and the mouse focus will not be selected in any input box. You have to move the mouse to the password box, re-enter the password, and then the verification code, click "Log on" again. If you are using Firefox, the situation is slightly better. At least the password can be saved for you, but the above mouse action is inevitable.

As you can understand, the speed is everything at this time, just a thousand miles away, saving a little time for mouse operations. You have several more logon opportunities than others.

This is where the oil monkey script above can help you. After installation, you will find that you only need to use the keyboard to perform operations during login, and then enter the verification code for two actions, press enter. If the Verification Code fails, press enter again. The mouse focus is still on the verification code. Enter the verification code, and press Enter ,.... As long as your keyboard operation is fast enough, you are definitely several times the normal login operation at this time. Are you sure you have? Haha

OK. After all, I finally got into the system and made a reservation. This script will continue to help you a little bit here.

If you do not need the script above, the normal operation process is to fill in the departure site and arrival site, the departure date, click the "re-query" button, and you will find no tickets, renewal, enter the information again, click again, or if there is no ticket, and then again?

At this time, the oil monkey script above can help us with this boring re-fill information action. We didn't set the departure site and arrival site, the departure date, this information is automatically entered by the script during ticket query,

 

 

Now, you just keep clicking the "re-query" button and look forward to the appearance of valuable tickets. Then, you know, whether the remaining booking is successful, whether the order is submitted successfully, and whether the payment can be completed, that's all God knows ..,

Of course, if the login fails, the system will be kicked and deprecated again, and the 502 Bad Gateway will be speechless. There is no way to solve these problems. We only need to retry, retry, and try again. We have to fight for the character at the crucial moment, luck.

In addition, there is an online article about how to use firebug to modify the parameter values on the HTML page, and then quickly place an order on the submit page, for more information about how to quickly book train tickets on the Internet within 15 seconds after Firefox + extension provided by netizens, I also tried it. It is of little use. It is only God knows whether the order can be submitted successfully, I basically got stuck here. I saw a ticket, but I couldn't submit my order...

But at least this script can save us a lot of time. In this age of nationwide ticketing, time is an opportunity, and time is money. Is it exciting? Please follow my tutorial to try it.

Finally, we recommend another script under chromium. I use chromium 16.

1. First open the following link in chromium to install the 12306 auto query script.

Https://gist.github.com/raw/1554666/dec45c925002ec23ccef9f5be14770572d27625c/12306.user.js

2. log on to 12306, select "Ticket Reservation", fill in the information, and perform a query. The following figure is displayed.

ProgramYes, it will be automatically queried. When there is a ticket, it will highlight the number of vehicles with a ticket. You can do other things during the query, but keep the tab open (whether it is the current tab or not ). Note: 1) only debugged on chromium. 2) automatic ticket booking is not supported. If you have a ticket, perform this operation manually.

Where is the most useful part of this script? Sometimes when you query a ticket, it will show that none of the tickets are available, but do not despair, because there is still a little hope. Because some people will refund the ticket, or some people will refund the ticket because of payment failure, timeout, and other reasons, the system will reclaim the ticket. At this time, this script will be awesome, you can see these rare resources one step ahead of others. What should you do when you see the red highlighted "one bar"? You know ....

In addition, the hard-seat and no-seat tickets in the system are all in the "hard-seat". Therefore, when you see that there are still tickets in the hard-seat ticket on the page, don't be too happy. It is very likely that after you make the payment, you will find that what you get is "no seat ticket", which is a pitfall ...,

There is also the need to use multiple browsers at the same time. What are Internet Explorer, Firefox, and chrome? In short, they can all be integrated... After logging on to each browser, it is a word-click, or even you can develop a corresponding policy to distribute trains and sites. In short, it's just a hard click. Don't let the 12306 backend system be idle...

Finally, someone may ask what to do with the last payment? I have to log on to IE again. Should I use online banking to complete the payment within 45 minutes? It is very likely that we will never go forever... In fact, payments can also be completed in Firefox and chrome. If you have China Merchants Bank, you can use mobile phones to make payments. When a non-IE browser is logged on, the mobile payment page is displayed by default.

 

Haha, anyway, today is a persistent struggle. I finally got a berth ticket for going home. I had little experience and did not dare to enjoy it. I will share it with you, if you buy a ticket for a technology house, you have to study your opponent carefully, prepare for everything you can, and fight for a long time, right?

 

Author: Dongting sangren

Source: http://phinecos.cnblogs.com/

This blog follows Creative Commons Attribution 3.0 License If it is used for non-commercial purposes, you can reprint it freely, but please keep the original author information and the article URL.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.