--- name: marketing-youtube-mine description: "Mine YouTube videos and comments for unanswered questions using yt-dlp. Use for channel or query research, recent uploads, comment extraction, question clustering, or YouTube content gaps." --- # marketing-youtube-mine yt-dlp-backed comment miner. Two-stage: `ytsearch` (or a channel's /videos tab) finds videos, then per-video comment extraction with `--extractor-args "youtube:max_comments=N,...;comment_sort=top"`. Question detection, answered heuristics, and clustering are a straight Python port of marketing-reddit's NLP, so both miners produce the same shapes and quality bar. ## Setup — nothing to configure Only dependency is `yt-dlp` on PATH (`brew install yt-dlp`). No API key, no config. Run `doctor` to confirm: ```bash python3 /cli.py doctor ``` ## Commands ```bash CLI=/cli.py # End-to-end mine: search → comments → questions → clusters (the daily-loop entry point) python3 $CLI mine --query "retatrutide dosing" --videos 8 --comments 250 \ --topic-keywords "reta|retatrutide|glp|dose" # optional regex filter # List videos: by search query, or a channel's recent uploads python3 $CLI videos --query "claude code" --limit 15 python3 $CLI videos --channel @LennysPodcast --limit 15 # Raw comments for one video (debugging / deeper reads) python3 $CLI comments --video VIDEO_ID --limit 250 ``` ## Output shape (`mine`) ```json { "query": "...", "videos_scanned": 8, "comments_scanned": 1900, "n_questions": 31, "n_unanswered": 12, "questions": [{ "q": "...", "score": 14, "answered": false, "n_replies": 0, "source": "youtube-comment", "thread_title": "