# Ultimate Scraper Re-Audit Checklist

Use this when the user asks to re-audit recommended fixes in `~/ultimate-scraper/` or another Stremio scraper repo.

## Process

1. Reconstruct the prior recommendations first, then verify each one against current code. Do not assume a previous audit's claims are still true.
2. Map the repo before deep reads: `python3 ~/.hermes/scripts/repo-map.py /home/rurouni/ultimate-scraper --budget 1500`.
3. Check exact implementation evidence with targeted searches:
   - `instantAvailability|addMagnet|selectFiles`
   - `/api/resolve|FREE_SCRAPER|free-scraper`
   - `FlareSolverr|flaresolverr|torrent-api-py|1337x.to`
   - `bitsearch.to|cheerio|infohash`
   - `version: '2.0.0'|"version": "2.0.0"|4.1.0`
4. Verify config/runtime state without printing secrets:
   - Check `.env` existence and key presence only (`test -f .env`, config endpoint booleans).
   - Do not cat `.env` or echo API keys.
5. Run the actual checks:
   - `npm test`
   - Boot on a throwaway port: `PORT=3991 node src/server.js`
   - `GET /api/health`, `/api/health/config`, `/manifest.json`
   - `GET /api/resolve?...` if embed proxy support was recommended
   - `GET /api/scrape?type=movie&id=tt0133093` to prove TMDB-dependent scraping behavior
6. Report in a done/missing table with file:line or live endpoint evidence for every recommendation.

## Known Ultimate Scraper Fix Items From July 2026 Audit

| Fix | Evidence to check |
|---|---|
| `.env` with TMDB/debrid keys | `.env` exists; `/api/health/config` reports `tmdbConfigured: true`; debrid checkers enabled in boot logs |
| RD cache strategy | `realdebrid.js` should either handle `instantAvailability` failures explicitly or use addMagnet/status flow; do not silently mark all hashes uncached |
| Free-scraper proxy | `/api/resolve` route exists and live route is not 404; points to free-scraper service on port 3092 if intended |
| 1337x reliability | Avoid sole dependency on `torrent-api-py.onrender.com`; use better fallback/parsing or browser/FlareSolverr path for blocked pages |
| BitSearch parser | Prefer Cheerio/structured extraction over one giant raw HTML regex for `infohash...seeders` |
| Version consistency | `package.json`, manifest, health route, startup log, and config version agree |

## Real-Debrid `instantAvailability` Note

Do not claim RD `instantAvailability` is absent from official docs without checking live docs. In July 2026, `https://api.real-debrid.com/` still listed `GET /torrents/instantAvailability/{hash}`. The durable concern is not “docs removed”; it is that the endpoint may be unreliable/deprecated in practice and silent `catch { return false; }` makes cache badges lie. If using it, log API error code/message and degrade explicitly. If replacing it, use `addMagnet` + `selectFiles` + `torrents/info` status flow.
