thomasms / glastoselenium
- вторник, 8 октября 2019 г. в 00:23:01
HTML
A bot for booking Glastonbury tickets using selenium
A script/package I used to book Glastonbury tickets in 2019 using selenium.
It can refresh quicker than any human.
NOTE: I have attempted to adapt this for 2020. It appears as though the html and format will remain unchanged, but sadly I can only test it live. I recommend starting with the script 'glasto2020.py'. Add your registration details and give it a go. It may automatically submit your registration details but again it may not. Also the urls are speculative, based on last year.
It usually requires a bit of tunning, but it works every time.
Try:
python3 scripts/glasto2020.pyRequires a webdriver - only tested with chromedriver (http://chromedriver.chromium.org/)
Look in examples and script directories on how to use it.
Run:
python setup.py installThen set the path to the driver via:
export CHROMEDRIVER=/path/to/chromedriverCan use the package as:
import glasto as gl
...Alternatively, the first version exists on PyPI and can be installed directly using pip:
pip install glastoSome test sites are being added to the submodule test/sites - https://github.com/thomasms/testsites.
These mimic a real life web site that needs a lot of refreshing.
One React SPA exists so far.
Just run it locally via npm
cd test/sites
npm startThen test the client script:
python test/testsite1.py