When [Zeke Gabrielse] needed to book a flight, the Internet hive-mind recommended that he look into traveling with Southwest airlines due to a drop in fares late Thursday nights. Not one to stay up all night refreshing the web page indefinitely, he opted to write a script to take care of the tedium for him.
Settling on Node.js as his web scraper of choice, numerous avenues of getting the flight pricing failed before he finally had to cobble together a script that would fill out and submit the search form for him. With the numbers coming in, [Grabrielse] set up a Twilio account to text him once fares dropped below a certain price point — because, again, why not automate?
[Gabrielse]’s patience paid off and he managed to snag tickets for thirty-six freaking dollars apiece. Saving money and learning a few tricks — what’s not to love? Of course, he was also generous enough to provide a GitHub link to his code and some instructions to boot.
Next step, automating your Android games.
[via /r/programming]
You didn’t mention it was for Southwest Air… :/
Umm… Line #2 of the text?
This is a good idea for a script.
It will be interesting to see what this type of automation does to the price spread over the long run as more and more people start to use this method
People do this and more.
Those air miles people are a bit cray
THis is the kind of stuff I love scripting.
The pricing shenanigans of airlines really toasts my nougats.
Why, oh WHY do we as consumers let this happen?
30% price changes in 5 seconds?
I get free-market, and we as consumers should find a way to punish behavior like this.
The same thing goes on with gasoline prices in the US. DAILY changes up $0.10, down $0.15, up $0.20 just to keep the consumer uninformed.
Arghhhhhh!!!!!!!!!!!!!!!
The upshot of forcing a fixed price, long-term, is that by necessity, it would HAVE to be high. Dynamic pricing makes you work a bit, but at least you can realize some savings.
Welcome to capitalism.
Refinery shut downs, rebel forces, OPEC throwing a tantrum, Supply & demand.
Fuel trickles into flight pricing, as does weather & flight booking. There’s greed there too, but they don’t do it entirely just because they can.
It actually happens naturally without any external influence: it’s called an Edgeworth cycle. You actually *don’t* see it in gas pricing typically because most gas stations are major company owned, so they aren’t responsive to local competition. In certain markets (central Ohio, Indianapolis, St. Louis) you do see it, due to high proportion of independent gas stations.
Not completely true. It’s only because in your state (country?) the companies don’t participate in local market competition as much. If you look to places like Australia / NZ you still have the major ownership with the majority of petrol stations owned by 3 major oil companies and 1 supermarket chain. In AU the Edgeworth cycle is 7 days, in NZ it’s 33 days.
I wrote a scraper in PowerShell that checked for Yosemite openings and sent me a Twilio text when available (actually, it searched for two openings at the same campground). It worked like a charm, except the week we were going to go ended up being kind of rainy so we canceled those reservations and went somewhere on the coast instead.
As a bonus, to the best of my searching, I couldn’t find any TOS that it violated on recreation.gov, either.
Any chance you would share your Yosemite Powershell script? I’m having trouble getting mine to work.
Isn’t this completely foiled by a single CAPTCHA?
If they always succeed at what they were intended for, then sure. But IRL… it seems a bit of an arms race and ‘foiled’ seems a bit premature.
I really heat those CAPTCHA. I can never read them right, Or its just my luck to get the most mest up ones.
I evan get my boys to help and they say dad its like driving with you, ” you get all the red lights”.
I really with they would use something else like ask if i’m a robot.
I checked out geet hub. great job.
Thanks I have other uses for it though. great thanks
If you read Captchas like you write English, it´s no wonder …
OR if you have your browser locked down tightly with the usual addins, and you don’t even SEE the flippin’ CAPTCHA.. To get around it, if I suspect I’m getting stymied by a captcha, I keep another browser (opera) with none of the protective addins, and sure enough theres a stupid captcha…. FUCK CAPTCHAS
If most CAPTCHAs were not so easy to defeat, then maybe. However most CAPTCHAs are quite awful in terms of actual usefulness… Some can be defeated by things as simple as running the photo through a series of two dimensional FFTs and IFFTs, which will remove most lines and such things as they use to frequently obscure the text. Then it is just a matter of simple OCR or other vision recognition software to determine the content. Of course there are many styles, but the most frequently used ones are rather bad at their job.
Sounds like a good opportunity for deep learning. Has anyone here tried out PyTorch? https://github.com/pytorch/tutorials/blob/master/Deep%20Learning%20with%20PyTorch.ipynb The linear algebra jargonlooks a bit intimidating, but the tutorial seems fairly thorough.
I feel like I ought to be taking better advantage of my cuda cores anyhow.
If enough people start doing this, the airlines may soon start to combat the game, by discovering N repeat requests from same location / machine. Could be to simple refuse you the service, or show you incorrect prices, or delay response more and more.
And who knows, maybe it will be against some TOS to do automated requests if you don’t have an official contract to do so.
Cat and mouse game.
They already do that…
Go check the price 2 or 3 times in a given site, then clean you cookies and you will the first(and usually lowest) price for that day…
Is there anyway to change this for another airlines?
I would probably /pay/ for a way to use other airlines
Pricing is a lottery now ?
Loving doing this kind of automation.
Had to write a bot to buy tickets to a sold out show as scalped tickets by bots got cancelled lol