Mithronn / rusty_ytdl

A Rust library for Youtube video searcher and downloader
https://docs.rs/rusty_ytdl
MIT License
107 stars 20 forks source link

Regression for livestream videos on 0.7.4 #36

Closed gokberkkocak closed 3 months ago

gokberkkocak commented 3 months ago

Some livestream videos (not all) are failing to be processed with version 0.7.4.

One example youtube livestream that consistently fails on 0.7.4 and works fine on 0.7.3: https://www.youtube.com/watch?v=vZYMwAm8sso

Example code:

    pub async fn get_raw_link(&self, url: &Url) -> Result<String> {
        info!("will capture livestream");
        let video_options = rusty_ytdl::VideoOptions {
            quality: rusty_ytdl::VideoQuality::HighestVideo,
            ..Default::default()
        };
        let video = rusty_ytdl::Video::new_with_options(url.as_str(), video_options)?;
        let stream = video.stream().await?;
        info!("livestream is captured");s
        ...
    }

Example outputs:

With 0.7.3

2024-08-11T09:51:26.823915Z  INFO sys::capture: will capture livestream
2024-08-11T09:51:27.775951Z  INFO sys::capture: livestream is captured

With 0.7.4

2024-08-11T09:54:34.309313Z  INFO sys::capture: will capture livestream
2024-08-11T09:54:35.876475Z  WARN client::worker: Problem with: The video not found
Mithronn commented 3 months ago

on my side, https://github.com/Mithronn/rusty_ytdl/commit/0179dea8ed4eabcbe7732d93662969fe26756f16 has solved the issue. You can try with

rusty_ytdl = { git = "https://github.com/Mithronn/rusty_ytdl/", branch = "main"}