/glasto-smasher

simple puppeteer script to help with buying glastonbury tickets

Primary LanguageJavaScriptMIT LicenseMIT

glasto-smasher

A node.js puppeteer bot that will reload a page until a provided phrase disappears

Install Dependencies

Recommend install on Linux or Mac, Windows is possible but you will need to install WSL2 and setup an X Server.

node.js

Install node.js for your platform

yarn

Install the yarn package manager

Git

Install Git

Running the app

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

Test mode

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'

Game day

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!