1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use once_cell::sync::Lazy;
pub struct HTMLParserConfig {
    pub from: &'static str,
    pub to: &'static str,
}
impl Default for HTMLParserConfig {
    fn default() -> Self {
        Self {
            from: "playerCaptionsTracklistRenderer\":",
            to: "},\"videoDetails\"",
        }
    }
}
/// configuration that contains anchor points for identifying captions from youtube's html webpage.
pub struct Config {
    pub(crate) parser: HTMLParserConfig,
}
impl Default for Config {
    fn default() -> Self {
        Self {
            parser: HTMLParserConfig::default(),
        }
    }
}
pub static CONFIG_VAL: Lazy<Config> = Lazy::new(|| Config::default());