Skip to content

AI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary

fix(env): restore multi-key rotation for SCRAPECREATORS_API_KEY

Trevin Chow19f8019323cc
diff --git a/skills/last30days/scripts/lib/env.py b/skills/last30days/scripts/lib/env.py
index e78f0120..9496ea47 100644
--- a/skills/last30days/scripts/lib/env.py
+++ b/skills/last30days/scripts/lib/env.py
@@ -270,6 +270,12 @@ def get_config() -> dict[str, Any]:
for key, default in keys:
config[key] = os.environ.get(key) or merged_env.get(key, default)
+ sc_key_raw = config.get('SCRAPECREATORS_API_KEY') or ''
+ if ',' in sc_key_raw:
+ import random
+ sc_keys = [k.strip() for k in sc_key_raw.split(',') if k.strip()]
+ config['SCRAPECREATORS_API_KEY'] = random.choice(sc_keys) if sc_keys else ''
+
# Track which config source was used
if project_env_path:
config['_CONFIG_SOURCE'] = f'project:{project_env_path}'