A Python script to export tournament game results from Czech Games Edition (CGE) Online to CSV format.
This script scrapes tournament game data from the "Games" tab on CGE Online tournament pages and exports it to a CSV file.
- Python 3
- beautifulsoup4
Install the required dependency:
pip install -r requirements.txt- Log in to https://account.czechgames.com
- Navigate to the tournament page (e.g.,
https://account.czechgames.com/tournaments/detail/1234) - Open your browser's Developer Tools (F12)
- Go to the Network tab
- Refresh the page
- Find the tournament page request in the network log
- Right-click on it and select "Copy as cURL"
Pipe your cURL command directly to the script:
curl 'https://account.czechgames.com/tournaments/detail/1234' \
-H 'User-Agent: Mozilla/5.0 ...' \
-H 'Cookie: YOUR_SESSION_COOKIES_HERE' \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' \
... \
| python3 parse_games.pyThe script will create tournament_games.csv in the current directory with the exported data.