replace youtube-dl with yt-dlp
This commit is contained in:
parent
60dffe9824
commit
47ff64585b
1 changed files with 3 additions and 1 deletions
|
@ -122,8 +122,10 @@ fn is_already_downloaded(link: &Link, file_name: &str) -> Result<bool> {
|
||||||
fn download_audio(link: &Link) -> Result<()> {
|
fn download_audio(link: &Link) -> Result<()> {
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
|
|
||||||
|
let cmd = "yt-dlp";
|
||||||
println!("download audio for {}", link.href());
|
println!("download audio for {}", link.href());
|
||||||
let output = Command::new("youtube-dl")
|
println!("{} --extract-audio --audio-format mp3 {}", cmd, &link.href);
|
||||||
|
let output = Command::new(cmd)
|
||||||
.arg("--extract-audio")
|
.arg("--extract-audio")
|
||||||
.arg("--audio-format")
|
.arg("--audio-format")
|
||||||
.arg("mp3")
|
.arg("mp3")
|
||||||
|
|
Loading…
Add table
Reference in a new issue