scraper: add SCRAPER_DISABLED_PROVIDERS to skip dead providers - #141
Open
peterdsp wants to merge 1 commit into
Open
scraper: add SCRAPER_DISABLED_PROVIDERS to skip dead providers#141peterdsp wants to merge 1 commit into
peterdsp wants to merge 1 commit into
Conversation
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
force-pushed
the
feat/scraper-disabled-providers
branch
from
September 8, 2026 12:28
2414bf0 to
64a967b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
SCRAPER_DISABLED_PROVIDERS(comma-separated provider ids).scrapeAll()andlistProviders(), so disabled providers are skipped even when a client explicitly requests them, and no longer advertised.scraper/.env.example.Verification
node --checkclean; scraper tests 25/25 on Node 20 (Pi) and Node 24 (local).SCRAPER_DISABLED_PROVIDERS=glotorrents,kickasstorrents,1337x:/providerslists 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.confon 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