feat: INCLUDE_SOURCES config + TikTok/Instagram opt-in in NUX
* feat: INCLUDE_SOURCES config + TikTok/Instagram opt-in in NUX - INCLUDE_SOURCES=tiktok,instagram in .env forces sources on for all query types, bypassing the tier system - NUX shows opt-in modal after ScrapeCreators key is saved: "Also search TikTok and Instagram?" with honest call-usage warning - Tier system preserved as default — override only when INCLUDE_SOURCES set Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: neutral call-usage copy — works for free and paid tiers --------- Co-authored-by: Matt Van Horn <mvanhorn@MacBook-Pro.local> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1735,6 +1735,18 @@ def main():
|
||||
search_run_tiktok = has_tiktok and qt.is_source_enabled("tiktok", query_type)
|
||||
search_run_instagram = has_instagram and qt.is_source_enabled("instagram", query_type)
|
||||
search_run_xiaohongshu = has_xiaohongshu
|
||||
|
||||
# INCLUDE_SOURCES override: force specific sources on regardless of tier
|
||||
_include_sources = {s.strip().lower() for s in config.get('INCLUDE_SOURCES', '').split(',') if s.strip()}
|
||||
if _include_sources:
|
||||
if 'tiktok' in _include_sources and has_tiktok:
|
||||
if not search_run_tiktok:
|
||||
sys.stderr.write("[Config] INCLUDE_SOURCES override: forcing tiktok\n")
|
||||
search_run_tiktok = True
|
||||
if 'instagram' in _include_sources and has_instagram:
|
||||
if not search_run_instagram:
|
||||
sys.stderr.write("[Config] INCLUDE_SOURCES override: forcing instagram\n")
|
||||
search_run_instagram = True
|
||||
if args.search:
|
||||
search_sources = parse_search_flag(args.search)
|
||||
has_reddit = "reddit" in search_sources
|
||||
|
||||
Reference in New Issue
Block a user