Skip to content

Instantly share code, notes, and snippets.

@SqlWaldorf
Last active May 31, 2024 08:26
Show Gist options
  • Save SqlWaldorf/64b3b50d17b36887959f24a8e0c88e05 to your computer and use it in GitHub Desktop.
Save SqlWaldorf/64b3b50d17b36887959f24a8e0c88e05 to your computer and use it in GitHub Desktop.
Summarize youtube video with ollama
from youtube_transcript_api import YouTubeTranscriptApi
from youtube_transcript_api.formatters import TextFormatter
import sys
formatter = TextFormatter()
video_id = sys.argv[1]
transcript = YouTubeTranscriptApi.get_transcript()
text_transcript = formatter.format_transcript(transcript)
print(text_transcript)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment