How to Solve NameError: name 'YouTubeTranscriptApi' is not defined -- youtube_transcript_api
Solution: Import the 'YouTubeTranscriptApi' module
To Solve the error, add the following line to the top of your code.
from youtube_transcript_api import YouTubeTranscriptApi
For more information:
Python youtube_transcript_api YouTubeTranscriptApi