github jdepoix/youtube-transcript-api v1.2.0

latest releases: v1.2.2, v1.2.1
one month ago

What's Changed

  • [BREAKING] Removed the deprecated methods get_transcript, get_transcripts and list_transcripts. They have already been deprecated in v1.0.0, but I've kept them around to allow for an easier migration to v1.0.0. However, these methods have led to a lot of issues being created due to people initializing a YouTubeTranscriptApi object and passing a proxy config into the constructor, but then calling the deprecated static methods on that object. As these methods are static they don't/can't access the state set in the constructor, therefore, the proxy config is ignored.

Migration Guide

If you're still using get_transcript, get_transcripts you have to change your code as follows:

# old API
transcript = YouTubeTranscriptApi.get_transcript("abc")

# new API
ytt_api = YouTubeTranscriptApi()
transcript = ytt_api.fetch("abc").to_raw_data()

If you're still using list_transcripts you have to change your code as follows:

# old API
transcript_list = YouTubeTranscriptApi.list_transcripts("abc")

# new API
ytt_api = YouTubeTranscriptApi()
transcript_list = ytt_api.list("abc")

Full Changelog: v1.1.1...v1.2.0

Don't miss a new youtube-transcript-api release

NewReleases is sending notifications on new releases.