Skip to content

Latest commit

 

History

History
54 lines (35 loc) · 1.37 KB

File metadata and controls

54 lines (35 loc) · 1.37 KB

TTA Tournament Scraper

A Python script to export tournament game results from Czech Games Edition (CGE) Online to CSV format.

What it does

This script scrapes tournament game data from the "Games" tab on CGE Online tournament pages and exports it to a CSV file.

Requirements

  • Python 3
  • beautifulsoup4

Installation

Install the required dependency:

pip install -r requirements.txt

Usage

Step 1: Get your authenticated cURL command

  1. Log in to https://account.czechgames.com
  2. Navigate to the tournament page (e.g., https://account.czechgames.com/tournaments/detail/1234)
  3. Open your browser's Developer Tools (F12)
  4. Go to the Network tab
  5. Refresh the page
  6. Find the tournament page request in the network log
  7. Right-click on it and select "Copy as cURL"

Step 2: Run the script

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.py

Step 3: Check the output

The script will create tournament_games.csv in the current directory with the exported data.

Step 4: Make trending plots

Run script plot_tournament.py in the current directory with the exported data.