Simple script that scrapes the bookmaker scores every 20 minutes and updates a spreadsheet as well as outputs to a discord webhook accordingly. Loosely based off of kyoukaya's gbf-scraper
-
The following packages:
- selenium
- seleniumrequests
- oauth2client
- BeautifulSoup
- gspread
- plotly
- discord [development version]
-
Chrome/chromium
-
Chrome webdriver (Must be in the same directory)
-
Setting up oauth2 to use google docs spreadsheets:
- Go to the Google APIs Console.
- Create a new project.
- Click Enable API. Search for and enable the Google Drive API and Google Sheets API.
- Create credentials for a Web Server to access Application Data.
- Name the service account and grant it a Project Role of Editor.
- Download the JSON file.
- Copy the JSON file to the same directory and rename it to
client_secret.json
- Create a google docs spreadsheet called GW Points under any account.
- Open
client_secret.json
and findclient_email
inside and copy this e-mail address. - On the google docs spreadsheet, share the spreadsheet to the e-mail that was copied and ensure that it has permission to edit.
The GW identifier must be 3 digits. e.g. 035
for the 35th GW.
usage: bookmaker-scraper.py [profile] [GW] [options]
example: python bookmaker-scraper.py profile1 035 -l
flag | arguments | description |
---|---|---|
--login, -l | None | Pauses the script upon starting up to allow logging in |