Hey,
I made a youtube downloader and thats basically it. You can download videos or audios from youtube or youtube music and do whatever you want with the downloaded stuff.
I made this because I was using yt-dlp (a python youtube downloader) for my music library. But yt-dlp was not able to downlaod full channels so i built my own downloader in rust.
This is my first big project and its still not done. There is a lot of stuff to do like better error handling or adding more features.
If you want to try this out yourself, create a new rust project, add the following dependencies:
[dependencies]
ytuwu = "0.2.1"
tokio = { version = "1", features = ["full"] }
put this in your main file:
use std::{fs::create_dir_all, path::Path};
use ytuwu::Downloader;
#[tokio::main]
async fn main() -> ytuwu::Result<()> {
let downloader = Downloader::default();
let dwn = downloader
.from_url("https://music.youtube.com/watch?v=-206erZYyBo")?
.as_media()?
.audio()
.download()
.await?;
create_dir_all("silly_path").unwrap();
dwn.save_media_stream(Path::new("silly_path"))?;
Ok(())
}
and finally replace the url with any youtube url you want.
This will download the sound of this video/song and will save it in a newly created directoy called “silly_path”.
Hope you enjoy :3
- 11 devlogs
- 61h