Skip to content

scraper: add SCRAPER_DISABLED_PROVIDERS to skip dead providers - #141

Open
peterdsp wants to merge 1 commit into
mainfrom
feat/scraper-disabled-providers
Open

scraper: add SCRAPER_DISABLED_PROVIDERS to skip dead providers#141
peterdsp wants to merge 1 commit into
mainfrom
feat/scraper-disabled-providers

Conversation

@peterdsp

@peterdsp peterdsp commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Why

On the production Pi, three providers fail on essentially every request (last 24h of scraper logs: GloTorrents 1160x, KAT 1143x, 1337x 985x "all domains exhausted"). Each one burns up to the full provider timeout per scrape, wasting CPU and request slots on a 2GB host.

What

  • New optional env SCRAPER_DISABLED_PROVIDERS (comma-separated provider ids).
  • Applied in both scrapeAll() and listProviders(), so disabled providers are skipped even when a client explicitly requests them, and no longer advertised.
  • Default behaviour is unchanged when the variable is unset.
  • Documented in scraper/.env.example.

Verification

  • node --check clean; scraper tests 25/25 on Node 20 (Pi) and Node 24 (local).
  • Already running on the Pi via a systemd drop-in with SCRAPER_DISABLED_PROVIDERS=glotorrents,kickasstorrents,1337x: /providers lists 19 entries, a real uncached scrape returned 104 streams, and 0 dead-provider log lines from the new process.

The env value lives in /etc/systemd/system/magnetio-scraper.service.d/override.conf on the host, which deploys do not touch; this PR only makes the code honour it so the next rsync does not revert the behaviour.

🤖 Generated with Claude Code

Some providers (GloTorrents, KAT, 1337x) fail on every request from the
production host, each burning up to the full provider timeout per scrape.
This adds an env-driven skip list applied in both scrapeAll() and
listProviders(), so disabled providers are ignored even when a client
explicitly asks for them. Default behaviour is unchanged when the variable
is unset.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@peterdsp
peterdsp force-pushed the feat/scraper-disabled-providers branch from 2414bf0 to 64a967b Compare September 8, 2026 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant