Preface: the National Day is about to go home, and the ticket is too late to be bought. When I open 12306, I sold all my tickets, so I thought about waiting for the system to return the ticket, as a result, the next script is generated, which opens the page for selecting a user when there is no ticket available. It is very simple but practical-the original art is really from life. Body start: var interval_id = Window. setinterval (function (){
Document. getelementbyid ('query _ ticket '). Click ();
VaR allorderbtn = Document. queryselectorall ('td [width = "80"] ');
For (VAR I = 0, length = allorderbtn. length; I <length; I ++ ){
If (allorderbtn [I]. firstchild & allorderbtn [I]. firstchild. nodetype = 1 ){
Window. clearinterval (interval_id );
Allorderbtn [I]. firstchild. Click ();
}
}
},2000 );
Usage:
- First, open the ticket query page.
- Open the browser console and copy the script to run it.
A very practical 12306 ticket flushing script