Firefox extension to generate JSON output of the score history of a Wingspan game on Board Game Arena.
This code has been developed and tested using Firefox around v118-119.
You can either use a release version of the extension, or the latest version of the code in the repo.
- Download the
.zip
file from the most recent release. - Open Firefox and navigate to
about:debugging
. - Select "This Firefox" from the sidebar.
- Click
Load Temporary Add-on...
. - Browse to and select the downloaded
.zip
file.
- Follow the project setup and production build instructions from
CONTRIBUTING.md
. - Open Firefox and navigate to
about:debugging
. - Select "This Firefox" from the sidebar.
- Click
Load Temporary Add-on...
. - Browse to and select
build-prod/manifest.json
.
- Navigate to a Wingspan game replay.
- A set of (currently crude) overlay buttons should appear at the bottom left of the browser window.
- Click
Check Move List
andCheck Play Sequence
to be sure that the move context scraping is working as expected. Both should show popup boxes containingtrue
- Click
Scrape Scores
. The script will start advancing through the game and scraping the scores. Once complete, it will automatically trigger download of the data files.
The Scrape Scores
functionality should automatically offer for download the
scraped score data using the default download method configured in Firefox's
settings.
Two files should be downloaded: one plaintext JSON file, and one file containing
a base64-encoded string. Both files contain the same data. To read the b64 data
in Python, use encoding='latin-1'
.
The files are named with the BGA table ID and a timestamp of when the data was scraped:
<table_id>-YYYYMMDD_HHMMSS.<ext>
If you wish, feel free to use this Google Colab notebook to
create a plot of the game score results. Paste the contents of the .b64
output
file into the definition for fullData
and run the entire notebook.
(needs schema of this JSON)