D2R Screenshot Pipeline

Automated pipeline for D2R screenshots from Steam: fetch, deduplicate, triage, evaluate items for build and trade value.

Overview

Two components:

  1. Steam Screenshots Scraper — downloads screenshots from a public Steam profile
  2. D2R Pipeline — processes downloaded screenshots through AI-powered triage and evaluation

File Locations

  • Pipeline script: ~/d2io/d2r-pipeline.py
  • Steam scraper: ~/scripts/steam_screenshots.py
  • State file: ~/d2io/.processed.json
  • Screenshots dir: ~/pictures/d2r/
  • Build config: ~/d2io/builds/fire-warlock.json

Steam Screenshots Scraper

Requirements

  • Python 3.8+
  • requests, beautifulsoup4
  • Public Steam profile (screenshots must be visible without auth)

Usage

# List direct links to full-res images
python ~/scripts/steam_screenshots.py <profile> <appid>
 
# Download to folder
python ~/scripts/steam_screenshots.py <profile> <appid> -d ./screenshots
 
# JSON output
python ~/scripts/steam_screenshots.py <profile> <appid> --json
 
# Limit count (for testing)
python ~/scripts/steam_screenshots.py <profile> <appid> --limit 5
 
# Set parallel workers
python ~/scripts/steam_screenshots.py <profile> <appid> -w 10

profile — custom URL (e.g. ccherya) or SteamID64 (17-digit number).

How It Works

  1. Parses grid view pages at steamcommunity.com/id/<profile>/screenshots/?appid=<appid>&view=grid&p=N
  2. Collects links to individual screenshot pages via pagination
  3. On each screenshot page, finds the full-res URL (images.steamusercontent.com/ugc/...?imw=5000)
  4. Resolves links in parallel (ThreadPoolExecutor, 5 workers by default)

Troubleshooting: “No screenshots found”

The scraper works without auth, so screenshots must be public:

  1. On Steam Deck: upload screenshots to Steam Cloud (View → Screenshots → Upload)
  2. When uploading, set visibility to Public
  3. Or in profile settings: Steam → Settings → Privacy → Screenshots → Public

Verify visibility by opening in a private browser window: https://steamcommunity.com/id/ccherya/screenshots/?appid=2536520

Pipeline Stages

  1. Fetch — retrieves screenshot list from Steam profile ccherya (D2R, AppID 2536520)
  2. Dedup — compares against .processed.json, skips already-processed screenshots (by Steam ID)
  3. Download — downloads new screenshots to ~/pictures/d2r/steam_<id>.jpg
  4. Triage — quick check via Claude Haiku: “is there an item tooltip in the screenshot?”
    • ITEM → proceeds to full evaluation
    • NOITEM → marked and skipped
  5. Evaluate — full evaluation via Claude Sonnet per Summon Warlock build:
    • Identifies item (unique/set/runeword/rare)
    • Build value (compared against ~/d2io/builds/summon-warlock.json)
    • Trade value (d2io prices for Ladder)
    • Verdict: keep / sell / charsi
  6. Save — result stored in .processed.json

Pipeline Usage

# Process new screenshots
python3 ~/d2io/d2r-pipeline.py
 
# Processing status
python3 ~/d2io/d2r-pipeline.py --status
 
# Re-check screenshots without items (in case of triage error)
python3 ~/d2io/d2r-pipeline.py --recheck
 
# Reset state (re-process everything)
python3 ~/d2io/d2r-pipeline.py --reset

Also available as /d2rscreenshoter command in Claude Code.

Configuration

Constants at the top of the pipeline script:

  • STEAM_PROFILE — Steam profile (default: ccherya)
  • STEAM_APPID — Game App ID (default: 2536520 — D2R)
  • SCREENSHOTS_DIR — download destination (default: ~/pictures/d2r/)
  • STATE_FILE — state file (default: ~/d2io/.processed.json)

Requirements

  • Steam screenshots must be public
  • claude CLI in PATH (used for triage and evaluation)
  • ~/scripts/steam_screenshots.py — Steam scraper
  • ~/d2io/d2io_client.py — d2io client (used by agent for prices)
  • ~/d2io/builds/fire-warlock.json — build config

State File Format (.processed.json)

{
  "processed": {
    "3672098280": {
      "detail_url": "https://steamcommunity.com/sharedfiles/filedetails/?id=3672098280",
      "file": "/home/ubuntu/pictures/d2r/steam_3672098280.jpg",
      "triage": "ITEM",
      "evaluation": "**Item:** Stealth..."
    }
  }
}

Useful App IDs

  • Dota 2: 570
  • Diablo II: Resurrected: 2536520

Find any game’s App ID: https://store.steampowered.com/app/<appid>