How can I search inside a youtube playlist?

HAYDEX picture HAYDEX · Sep 20, 2014 · Viewed 20.4k times · Source

I need to know if youtube API V3 supports searching inside a specific youtube playlist? And is there any other way to do that?

Answer

asashnov picture asashnov · Oct 13, 2016

For doing full-text search in closed captions (CC) in a Youtube channel you may download all the subtitles from the channel and do local text search in it:

$ youtube-dl --write-auto-sub --skip-download "https://www.youtube.com/channel/UC6oh54zIYKyW6hgBiZzLLsA"

that will download about 160 .vtt text files

$ grep -i -C 2 'autumn' *.vtt

Note: Option --write-auto-sub should be used when author of videos didn't upload text. Otherwise use --write-sub.