pub struct StreamingDataExtractor;
Expand description
§StreamingDataExtractor
Extracts streaming data information from YouTube’s player response data.
The streaming data contains information about available video and audio formats, including URLs, quality options, bitrates, and codec details.
Implementations§
Source§impl StreamingDataExtractor
impl StreamingDataExtractor
Sourcepub fn extract_streaming_data(
player_response: &Value,
video_id: &str,
) -> Result<StreamingData, CouldNotRetrieveTranscript>
pub fn extract_streaming_data( player_response: &Value, video_id: &str, ) -> Result<StreamingData, CouldNotRetrieveTranscript>
Extracts streaming data from the player response JSON.
§Parameters
player_response
- The parsed YouTube player response JSON objectvideo_id
- The YouTube video ID (used for error reporting)
§Returns
Result<StreamingData, CouldNotRetrieveTranscript>
- The parsed streaming data or an error
§Errors
This method will return an error if:
- The streaming data is missing from the player response
- The JSON structure does not match the expected format
Auto Trait Implementations§
impl Freeze for StreamingDataExtractor
impl RefUnwindSafe for StreamingDataExtractor
impl Send for StreamingDataExtractor
impl Sync for StreamingDataExtractor
impl Unpin for StreamingDataExtractor
impl UnwindSafe for StreamingDataExtractor
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