Lurker News
yt-fts is a simple python script that uses yt-dlp to scrape all of a youtube channels subtitles and load them into an sqlite database that is searchable from the command line. It allows you to query a channel for specific key word or phrase and will generate time stamped youtube urls to the video containing the keyword.

Comments (165) 32 threads

Show all comments

Showing thread 8 of 32

ggerganov1 reply#
For videos without subtitles one could chain Whisper to auto-generate transcripts, though that would require downloading the audio and processing it
cced1 reply#
This is exactly what I’ve built. Nothing fancy just ytdlp + whisper + ripgrep + fzf and I’ve got a pretty interesting way to ctrl+f my YT history.
gukoff1 reply#
Mind to share? I'd like to try this out
zdwolfe#
Not OP, but I too wrote something nearly identical with whisper so I could creep on old EthosLab videos. Here's the gist:

from pytube import Channel
import whisper
channel_yt = Channel(channel_url)
video_yt = channel_yt.videos[0]
video_yt_stream = video_yt.streams.filter(mime_type="video/mp4").filter(res="720p").first()
video_yt_video_file_path = video_yt_stream.download()
audio = whisper.load_audio(video_yt_video_file_path)
model = whisper.load_model("tiny")
transcript = model.transcribe(audio)