Integrations

integrations.youtube.types

YouTube integration type definitions.

class lingua_loop.integrations.youtube.types.SupportedLanguageCodes(*values)[source]

Bases: str, Enum

Supported language codes for YouTube transcripts.

DUTCH = 'nl'
ENGLISH = 'en'
GERMAN = 'de'
ITALIAN = 'it'
class lingua_loop.integrations.youtube.types.SupportedLanguages(*values)[source]

Bases: str, Enum

Human-readable language names.

DUTCH = 'Dutch'
ENGLISH = 'English'
GERMAN = 'German'
ITALIAN = 'Italian'

integrations.youtube.wrapper

Wrapper around YouTube Transcript API.

lingua_loop.integrations.youtube.wrapper.fetch_transcript(video_id: str, language_code: SupportedLanguageCodes) FetchedTranscript[source]

Fetch a transcript for a video in a specific language.

lingua_loop.integrations.youtube.wrapper.list_transcripts(video_id: str) TranscriptList[source]

List all available transcripts for a video.

lingua_loop.integrations.youtube.wrapper.video_has_transcript_in_language(transcript_list: TranscriptList, language_code: SupportedLanguageCodes) bool[source]

Check if a video has a transcript in the specified language.