Skip to main content

Module youtube

Module youtube 

Source
Expand description

YouTube TranscriptSource.

Wires the offline parsers (url, player_response, timedtext) into a concrete TranscriptSource backed by an HTTP client. The request shape is pinned to the ANDROID_VR InnerTube client (see innertube); a visitorData token is scraped from the watch page on first use (watch_page) and cached for the lifetime of the Youtube instance.

Re-exports§

pub use player_response::check_playability;
pub use player_response::extract_media_info;
pub use player_response::list_languages;
pub use player_response::parse as parse_player_response;
pub use player_response::select_track;
pub use player_response::CaptionTrack;
pub use player_response::PlayerResponse;
pub use player_response::SelectedTrack;
pub use timedtext::parse as parse_timedtext;
pub use url::extract_video_id;

Modules§

innertube
HTTP wrapper around YouTube’s InnerTube /player endpoint.
player_response
Serde-deserialisable view of YouTube’s playerResponse envelope plus the caption-track selector.
timedtext
Parser for YouTube’s json3 (a.k.a. srv3) timedtext format.
url
Extract a YouTube video ID from a public URL or a bare ID.
watch_page
Watch-page bootstrap: scrapes INNERTUBE_CONTEXT.client.visitorData from a YouTube /watch HTML response.

Structs§

Youtube
YouTube TranscriptSource.

Functions§

matches_url
Whether input is recognised as a YouTube locator (URL or bare ID).