Easy to use python script to copy formatted transcripts from your favorite Youtube videos
The script needs the following package:
pip install youtube-transcript-api
After installing this, just download main.py and use it
- Start
main.py
- Input your Youtube video URL
- Copy the transcript and exit
There are only 5 lines of code really
from youtube_transcript_api import YouTubeTranscriptApi #Import Transcript API
from youtube_transcript_api.formatters import TextFormatter #Import the text formatter
ID = input("Youtube Video URL: ").split('?v=')[1].lstrip().split('&')[0] #Get ID from URL input
print('\n',TextFormatter().format_transcript(YouTubeTranscriptApi.get_transcript(ID)).replace('\n', ' ')) #Export transcript
input("\nCopy the text, then press ENTER to exit...") #Give the user time to copy before exitting