Skip to main content

ExtractorConfig

Trait ExtractorConfig 

Source
pub trait ExtractorConfig: VideoExtractor {
    // Required methods
    fn args_mut(&mut self) -> &mut Vec<String>;
    fn timeout_mut(&mut self) -> &mut Duration;

    // Provided methods
    fn with_arg(&mut self, arg: String) -> &mut Self { ... }
    fn with_timeout(&mut self, timeout: Duration) -> &mut Self { ... }
    fn with_cookies(&mut self, path: impl AsRef<Path>) -> &mut Self { ... }
    fn with_cookies_from_browser(&mut self, browser: &str) -> &mut Self { ... }
    fn with_netrc(&mut self) -> &mut Self { ... }
}
Expand description

Common configuration methods for all extractors.

Required Methods§

Source

fn args_mut(&mut self) -> &mut Vec<String>

Returns a mutable reference to the internal args vector.

Source

fn timeout_mut(&mut self) -> &mut Duration

Returns a mutable reference to the internal timeout.

Provided Methods§

Source

fn with_arg(&mut self, arg: String) -> &mut Self

Add custom yt-dlp argument.

Source

fn with_timeout(&mut self, timeout: Duration) -> &mut Self

Set timeout for yt-dlp operations.

Source

fn with_cookies(&mut self, path: impl AsRef<Path>) -> &mut Self

Use a Netscape cookie file for authentication.

Source

fn with_cookies_from_browser(&mut self, browser: &str) -> &mut Self

Extract cookies from a browser for authentication.

Source

fn with_netrc(&mut self) -> &mut Self

Use .netrc for authentication.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§