A comprehensive web scraping system for collecting video game player count data from multiple sources including Steam Charts and ActivePlayer.io.
- Multi-Source Data Collection: Scrapes from Steam Charts (historical monthly data) and ActivePlayer.io (current player counts)
- 60+ Games Supported: Covers popular games across different genres and platforms
- Anti-Detection Measures: Advanced techniques to avoid being blocked by websites
- Retry Logic: Handles timeouts and failures gracefully
- Flexible Data Parsing: Supports various number formats (1K, 1M, commas, etc.)
- Comprehensive Logging: Detailed progress tracking and debugging information
- Modular Design: Separate scrapers for different data sources
โโโ scraper.py # Interactive launcher with menu
โโโ steamdb_scraper.py # Steam Charts scraper (historical data)
โโโ activeplayer_scraper.py # ActivePlayer.io scraper (current data)
โโโ main_scraper.py # Combined scraper orchestrator
โโโ requirements.txt # Python dependencies
โโโ README.md # This file
- Battle Royale: PUBG, Apex Legends, Rust, ARK, DayZ
- FPS: Counter-Strike 2, Team Fortress 2, Rainbow Six Siege, Payday 2
- RPG: Elden Ring, Cyberpunk 2077, Baldur's Gate 3, The Witcher 3
- MMO: Lost Ark, Monster Hunter: World, Destiny 2, Warframe
- Indie: Among Us, Hades, Stardew Valley, Terraria
- Strategy: Civilization VI, Garry's Mod
- Survival: The Forest, Subnautica, No Man's Sky, Valheim
- Battle Royale: Fortnite, PUBG, Apex Legends, Call of Duty Warzone
- MOBA: League of Legends, Dota 2, Heroes of the Storm
- FPS: Valorant, Overwatch 2, Counter-Strike 2
- MMO: World of Warcraft, Final Fantasy XIV, Black Desert Online
- Plus all Steam games above
- Clone or download the project
- Install dependencies:
pip install -r requirements.txt
python scraper.pyThen choose from the interactive menu:
- Steam Charts scraper
- ActivePlayer scraper
- Combined scraper (both sources)
python steamdb_scraper.pypython activeplayer_scraper.pypython main_scraper.py# Run specific scraper
python main_scraper.py steam
python main_scraper.py activeplayer
python main_scraper.py combinedThe scrapers generate the following CSV files:
steam_monthly_player_counts.csv- Historical monthly average and peak player counts from Steamactiveplayer_current_counts.csv- Current player counts from ActivePlayer.iocombined_player_counts.csv- Combined dataset from both sources with source tracking
| Month | Game | Avg Players | Peak Players | Source | Scraped At |
|---|---|---|---|---|---|
| June 2025 | Rust | 100,433.5 | 187,345 | Steam Charts | 2025-01-15 14:30:00 |
| Date | Game | Current Players | Peak Players | Source | Scraped At |
|---|---|---|---|---|---|
| 2025-01-15 | Fortnite | 2,500,000 | 3,200,000 | ActivePlayer | 2025-01-15 14:30:00 |
You can adjust timing parameters in each scraper file:
REQUEST_DELAY_MIN = 5 # Minimum seconds between requests
REQUEST_DELAY_MAX = 10 # Maximum seconds between requests
PAGE_LOAD_TIMEOUT = 20 # Page load timeout in seconds
MAX_RETRIES = 3 # Maximum retry attemptsTo add new games, edit the game dictionaries in the respective scraper files:
- Steam games: Add to
steam_gamesinsteamdb_scraper.py - ActivePlayer games: Add to
activeplayer_gamesinactiveplayer_scraper.py
- Realistic user agent strings
- Random delays between requests
- WebDriver property masking
- Browser fingerprint randomization
- Retry logic with exponential backoff
- Handles comma-separated numbers (1,234,567)
- Supports K/M/B suffixes (1K, 1M, 1B)
- Ignores percentage changes
- Validates numeric data before saving
- Graceful timeout handling
- Automatic retries for failed requests
- Detailed error logging
- Continues processing other games if one fails
๐ Starting Steam Charts scraper with Selenium...
๐ฑ Setting up Chrome driver...
โณ Waiting 10 seconds before starting...
[1/60] Scraping Dota 2...
Loading Dota 2 page... (attempt 1/3)
Found table with selector: table.common-table
๐ Found 158 rows in table
๐ Table headers: ['Month', 'Avg. Players', 'Gain', '% Gain', 'Peak Players']
๐ฏ Using columns: Avg=1, Peak=4
Row 1: Month='Last 30 Days', Avg='456,789.0', Peak='789,123'
โ
Successfully scraped 157 records for Dota 2
โ
Successfully scraped 3,240 records from 58/60 games
๐ Data saved to steam_monthly_player_counts.csv
๐ Summary by game:
1. Dota 2: 456,789
2. Counter-Strike 2: 234,567
3. PUBG: 123,456
...
- Rate Limiting: The scrapers include delays to respect website rate limits
- Browser Required: Uses Selenium with Chrome WebDriver
- Internet Connection: Requires stable internet connection
- Legal Compliance: Only scrapes publicly available data
- Data Accuracy: Data accuracy depends on the source websites
- ChromeDriver not found: Install with
pip install webdriver-manager - Timeout errors: Increase
PAGE_LOAD_TIMEOUTin scraper files - No data found: Check if game slugs/IDs are correct
- Rate limiting: Increase delay times between requests
Enable debug output by uncommenting headless mode in scraper files:
# chrome_options.add_argument("--headless")This project is for educational and research purposes. Please respect the terms of service of the websites being scraped.
Feel free to:
- Add more games to the supported lists
- Improve error handling and reliability
- Add support for additional data sources
- Optimize performance and timing
Happy Scraping! ๐ฎ๐