A node.js puppeteer bot that will reload a page until a provided phrase disappears
Recommend install on Linux or Mac, Windows is possible but you will need to install WSL2 and setup an X Server.
Install node.js for your platform
Install the yarn package manager
Open your terminal and clone the repo
git clone git@github.com:jps/glasto-smasher.git
Navigate to the cloned repo
cd glasto-smasher
Install the dependencies
yarn
A test site is available, by pulling and running https://github.com/thomasms/testsites
Open a second terminal and enter each of the following
git clone https://github.com/thomasms/testsites
cd testsites
yarn
yarn start
Once started the site will report a url that it's running on this can be added to the test script below
Now you can run the script local with
yarn smash --url http://localhost:3000/ --phrase 'Number of hits'
You will need to input the url of holding page, this will be the page that is reloaded e.g. https://glastonbury.seetickets.com/event/glastonbury-2020-deposits/worthy-farm/1450000
you won't know this until the day!
Next you will need to put in a piece of text that will only appear on the loading page, this will be something like this page will refresh automatically
you can also add an xpath here e.g //text()[contains(.,'this page will refresh automatically')]
Giving us either:
yarn smash --url 'https://glastonbury.seetickets.com/event/glastonbury-2020-deposits/worthy-farm/1450000' --phrase 'this page will refresh automatically'
Or for xpath:
yarn smash --url 'https://glastonbury.seetickets.com/event/glastonbury-2020-deposits/worthy-farm/1450000' --xpath "//text()[contains(.,'this page will refresh automatically')]"
The application will now reload and hand over control when it gets through, good luck!