This script tracks your case openings in CS:GO and CS2 and prints stats about skins, rarities, and special drops (Classified, Covert, Contraband, Extraordinary gloves).
It generates a CSV log (case_openings.csv
) and prints colorful output in the terminal.
- Windows Users: Use Command Prompt, not PowerShell. PowerShell does not handle ANSI colors correctly.
- Steam Cookies: You need your
sessionid
andsteamLoginSecure
cookies. - Steam ID: Put your SteamID
steam_config.json
file (the one in your profile url):
{
"steamid": "<your steam id>",
"sessionid": "<your sessionid here>",
"steamLoginSecure": "<your steamLoginSecure here>"
}
- Open Steam Community in Chrome.
- Press
F12
→Application
→Cookies
. - Copy
sessionid
andsteamLoginSecure
.
- Open Steam Community in Firefox.
- Press
F12
→Storage
→Cookies
. - Copy
sessionid
andsteamLoginSecure
.
⚠️ If cookies are wrong, or if Steam temporarily blocks your IP, you will see:
Attempt {attempt}/{retries} failed: {e}. Retrying in {delay}s...
To avoid future IP blocks, open case_logger.py
in your favorite text editor and change time.sleep(1)
to `time.sleep(3)
- Install dependencies:
pip install requests beautifulsoup4
- Update
steam_config.json
with your cookies and SteamID. - Run the script:
python case_logger.py
- Tracks all case openings.
- Counts StatTrak™ items.
- Shows cumulative rarity stats.
- Shows cumulative case opening stats.
- Top 3 opened skins.
- Tracks last knife and glove openings.
- Special drops: Classified, Covert, Contraband, Extraordinary gloves.
- Generates
case_openings.csv
.