What's Changed
- [BREAKING] Removed the deprecated methods
get_transcript
,get_transcripts
andlist_transcripts
. They have already been deprecated inv1.0.0
, but I've kept them around to allow for an easier migration tov1.0.0
. However, these methods have led to a lot of issues being created due to people initializing aYouTubeTranscriptApi
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