yet another youtube (and more) down loader
% yaydl "https://www.youtube.com/watch?v=jNQXAC9IVRw"
% yaydl --help
ffmpeg
).There is an easy way to add more supported sites, see below for details.
The list of features is deliberately kept short:
yaydl
assumes that you have a large hard drive and your internet connection is good enough, or else you would stream, not download.yaydl
currently ignores video meta data (except the title) unless they are a part of the video file.Install Rust (e.g. with rustup), then:
using Fossil:
% fossil clone https://code.rosaelefanten.org/yaydl yaydl.fossil
% mkdir yaydl ; cd yaydl ; fossil open ../yaydl.fossil
% cargo build --release
using Git:
% git clone https://github.com/dertuxmalwieder/yaydl
% cd yaydl
% cargo build --release
Nobody has provided any packages for yaydl
yet. You can help!
yaydl at tuxproject dot de
), on the IRC or as a GitHub Pull Request. Note that GitHub only provides a mirror, so you'd double my work if you choose the latter. :-)If you do that well (and regularly) enough, I'll probably grant you commit access to the upstream Fossil repository.
definitions::SiteDefinition
as handlers/<YourSite>.rs
.inventory::submit! { &YourSiteHandler as &dyn SiteDefinition }
handlers.rs
.Cargo.toml
.```rust // handlers/noop.rs
use anyhow::Result; use crate::definitions::SiteDefinition;
struct NoopExampleHandler;
impl SiteDefinition for NoopExampleHandler {
fn canhandleurl<'a>(&'a self, url: &'a str) -> bool {
// Return true here, if
fn does_video_exist<'a>(&'a self, url: &'a str) -> Result<bool> {
// Return true here, if the video exists.
false
}
fn find_video_title<'a>(&'a self, url: &'a str) -> Result<String> {
// Return the video title from <url> here.
Ok("".to_string())
}
fn find_video_direct_url<'a>(&'a self, url: &'a str, onlyaudio: bool) -> Result<String> {
// Return the direct download URL of the video (or its audio version) here.
Ok("".to_string())
}
fn find_video_file_extension<'a>(&'a self, url: &'a str, onlyaudio: bool) -> Result<String> {
// Return the designated file extension of the video (or audio) file here.
Ok("mp4".to_string())
}
fn display_name<'a>(&'a self) -> String {
// For cosmetics, this is the display name of this handler.
"NoopExample"
}
}
// Push the site definition to the list of known handlers: inventory::submit! { &NoopExampleHandler as &dyn SiteDefinition } ```
Writing this software and keeping it available is eating some of the time which most people would spend with their friends. Naturally, I absolutely accept financial compensation.
Thank you.
irc.freenode.net/yaydl