Open-source projects help me go home-two minutes to complete online booking from login to payment

Source: Internet
Author: User

Sorry, I said I wanted to send the source code last night, but because the girl who rented the master bedroom of the same house went home for the new year, it seems that the route power was disconnected and not sent to the Internet. In fact, the first open-source project has basically completed the basic functions, but it only requires a little modification. If I have time, I will write down how to use tessocr and extendedwebbrowser.

 

Today, the new version of the game is going to be online and busy with bug changes. We will go home from the office at, and now we have BT5 installed. We will use the wireless next door to get the source code online.

Source code threw on codeplex http://book12306ticket.codeplex.com/

In this way, I can modify the information in the office. I have no time to organize a third-party class and directly threw it into the bin. I uploaded my own ref.

 

TheCodeAll source projects on the Internet

It took less than two hours to piece it together.ProgramYou can perform all the operations from login to payment within two minutes.

Below is the text

Problems to be Solved:

1. Login Failed

2. You cannot submit the order after logging on.

3. If the payment is unsuccessful after the order is submitted, log on again.

Start solving the problem:

 

First, we need to implement all the procedures from login to ticket booking, and implement them automatically. An open-source project on codeplex from login to ticket booking

Trainsearch http://myticketsearch.codeplex.com/basic implementation and combined with the webbrowser space can be successfully logged on after sharing a session, the web page does not need to log on again.

However, this project is not automated. You need to manually enter the verification code.

So my initial modification was to use tessocr verification code recognition (using tessocr by Java booking open source project inspired http://code.google.com/p/go-home/ )

After that, I found a bug that someone did not refresh the verification code (although I had known this bug but did not expect that they did not fix it for six months). So I modified the logic of the Code and requested a verification code.

This solves the first two problems.

 

The last problem is that you have to log on again after payment.

In addition, the session we maintain in webbrowser will pop up a new ie window because the "online payment" button is target = "_ blank", and the session we maintain in webbrowser cannot be passed.

Here we need not pop up ie so we use another open source project extendedwebbrowser http://www.codeproject.com/KB/cpp/ExtendedWebBrowser.aspx

 

In this way, the session problem is solved. You do not need to log on to the broken web page and directly use a program to solve the following program.

Related Article

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.