pub struct InnerTubeClient { /* private fields */ }Expand description
InnerTube API client for fetching YouTube transcript data
This client uses YouTube’s internal InnerTube API instead of the legacy transcript URLs to fetch caption data. This approach is more reliable and doesn’t require cookie authentication for public videos.
Implementations§
Source§impl InnerTubeClient
impl InnerTubeClient
pub fn new(client: Client) -> Self
Sourcepub async fn get_transcript_data(
&self,
video_id: &str,
) -> Result<Value, CouldNotRetrieveTranscript>
pub async fn get_transcript_data( &self, video_id: &str, ) -> Result<Value, CouldNotRetrieveTranscript>
Fetch transcript data using YouTube’s InnerTube API
Sourcepub async fn get_transcript_list(
&self,
video_id: &str,
) -> Result<Value, CouldNotRetrieveTranscript>
pub async fn get_transcript_list( &self, video_id: &str, ) -> Result<Value, CouldNotRetrieveTranscript>
Alternative approach: try to get transcript list first
Auto Trait Implementations§
impl Freeze for InnerTubeClient
impl !RefUnwindSafe for InnerTubeClient
impl Send for InnerTubeClient
impl Sync for InnerTubeClient
impl Unpin for InnerTubeClient
impl !UnwindSafe for InnerTubeClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more