Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/translating transcripts #42

Merged
merged 11 commits into from Dec 30, 2019
Merged

Conversation

jdepoix
Copy link
Owner

@jdepoix jdepoix commented Dec 30, 2019

  • added list_transcripts(video_id) to YouTubeTranscriptApi, which returns a TranscriptList object, representing all available transcripts
    • TranscriptList objects provide the methods find_transcript(languages), find_generated_transcript(languages) and find_manually_created_transcript(languages), which return Transcript objects
      • Transcript objects represent a transcripts and provide metadata properties
      • by calling transcript.fetch() the actual transcript is fetched
  • added new translation feature
    • by calling transcript.translate('de') on a Transcript object YouTubes translation feature can be accessed
  • added more specific exception types and thereby vastly improved error messages
    • TranscriptsDisabled, NoTranscriptFound, VideoUnavailable, NotTranslatable, TranslationLanguageNotAvailable, NoTranscriptAvailable
    • all exceptions are subtypes of CouldNotRetrieveTranscript
  • updated CLI to make new features accessible
  • updated Documentation to explain new features and changes
  • completely reworked how the module scrapes transcripts, which makes it way more solid

BREAKING CHANGES:

  • youtube_transcript_api.YouTubeTranscriptApi.CouldNotRetrieveTranscript has been move to youtube_transcript_api.CouldNotRetrieveTranscript

@jdepoix jdepoix merged commit 6895160 into master Dec 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant