[ale] How to drive Linux browser to make a campground sniper?

Alex Carver agcarver+ale at acarver.net
Sat Jan 13 21:04:54 EST 2018


One of the advantages of a plugin is that it can insert code into a page
as it loads and before execution.  So you can trigger JavaScript
functions that recreation.gov is already using, add your own to
auto-populate fields on final rendering, and perform all the callbacks
and form posts.

On 2018-01-13 17:52, neal at mnopltd.com wrote:
> Thanks.   And as it is available for Chrome, and is a plug-in,  it seems to 
> avoid some of the pitfalls of external tools.
> 
>     -------- Original Message --------
>     Subject: Re: [ale] How to drive Linux browser to make a campground
>     sniper?
>     From: Alex Carver via Ale <ale at ale.org <mailto:ale at ale.org>>
>     Date: Sat, January 13, 2018 2:32 pm
>     To: ale at ale.org <mailto:ale at ale.org>
> 
>     Greasemonkey is the most frequently used scripting plugin for Firefox
> 
>     On 2018-01-13 11:20, Pete Hardie via Ale wrote:
>     > I have used a Firefox extension that could script both butting presses and
>     > field entries, and I believe it could check data form the page.  I will see
>     > if I can look up the name
>     > 
>     > On Sat, Jan 13, 2018 at 2:16 PM, Neal Rhodes via Ale <ale at ale.org <mailto:ale at ale.org>> wrote:
>     > 
>     >> Boring "Real-World Details":
>     >>
>     >> So, we are planning a summer trip to Glacier National Park in Montana.
>     >>
>     >> We would really like to camp at Many Glaciers Campground in the park.
>     >> However, at present,  all the sites are already reserved.   They are
>     >> reserved through recreation.gov <http://recreation.gov>, starting 6 months to the day from today.
>     >>
>     >> But we have a really strong impression that people initially book a long
>     >> stretch, then later either reduce the duration once they get more specific
>     >> plans, or cancel.
>     >>
>     >> SO, we really want to detect if/when sites become available over the next
>     >> 6 months and jump on it before someone else does.
>     >>
>     >> There is someone who offers this as a service for $40 a reservation,
>     >> irrespective of whether they are successful.
>     >>
>     >> Exciting Technology Application:
>     >>
>     >> Initially I looked at the HTML for their search page, with the thought of
>     >> using "wget" to simulate the reservation request.   That increasingly looks
>     >> like a fool's errand, assuming that they may have session cookies related
>     >> to sign-on and other magic handshake crap that would be difficult to
>     >> simulate.  And what happens when they alter their data fields?
>     >>
>     >> Then I thought:  All I want to do is:
>     >>
>     >> Setup a browser window on our Centos 6 desktop, any browser that
>     >> understands https;
>     >> Run that browser through the responses to get it to the search window on
>     >> this campground, and put in all the dates and related input.
>     >> Then:
>     >>
>     >> Run SOMETHING that will automate:
>     >>
>     >> Hit the Search Submit button;
>     >> See if the resultant page contains "No Suitable availability"
>     >> IF Not: Email me
>     >> Sleep 15 minutes
>     >> Rinse, Later, Repeat
>     >>
>     >> This sounds to me like a very elemental application of a test/control
>     >> manager for a GUI interface.    If I can automate an existing browser, we
>     >> can eliminate all the complexities of trying to fake out their web server.
>     >>
>     >> Since this just sits on my desk in the basement, I can live with
>     >> hard-coded screen coordinates.
>     >>
>     >> What tools exist in Linux to do this?
>     >>
>     >> regards,
>     >>
>     >> Neal Rhodes
>     >> MNOP Ltd
>     _______________________________________________
>     Ale mailing list
>     Ale at ale.org <mailto:Ale at ale.org>
>     http://mail.ale.org/mailman/listinfo/ale
>     See JOBS, ANNOUNCE and SCHOOLS lists at
>     http://mail.ale.org/mailman/listinfo
> 



More information about the Ale mailing list