Skip to content

Latest commit

 

History

History
13 lines (13 loc) · 407 Bytes

README.md

File metadata and controls

13 lines (13 loc) · 407 Bytes

youtube-dl-rs

Runs youtube-dl and parses its JSON output. Example:

  let output = YoutubeDl::new("https://www.youtube.com/watch?v=VFbhKZFzbzk")
      .socket_timeout("15")
      .run()
      .unwrap();
  let title = match output {
      YoutubeDlOutput::SingleVideo(video) => video.title,
      _ => panic!("single video should not be a playlist")  
  };
  println!("Video title: {}", title);