# y > algorithmically-enhanced yt-dlp (youtube-dl) wrapper for audio-downloads ## install 1. look at [`install.sh`](./install.sh) file for instructions 1. adjust `PREFIX` at wish 1. make sure the final directory is on `$PATH` ## use `y https://orax.bandcamp.com/track/ectoplasmic` (adjust [config.sh](./config.sh) file to set your prefered download paths) ## requirments - [`yt-dlp`](https://github.com/yt-dlp/yt-dlp/) – the main thing - [`ffmpeg`](https://ffmpeg.org/download.html) – to convert files of diffrent formats - [`sd`](https://github.com/chmln/sd) – a better `sed` - [`lynx`](https://github.com/lynx/lynx) – to easily scrap web-pages ## site-specific improvements ### bandcamp 1. prefers mp3-320 (checks every track) 2. downloads entire discography if given root-domain or `/music` url ### twitter file-name is now twitter-username and tweet-id (instead of full text of a tweet, which can result in strings over 255 characters long, aborting the entire process) ### reddit file-name is now subreddit, post-id, and url-slug (instead of full text of a title, which can result in strings over 255 characters long, aborting the entire process) ### youtube allows to set several predetermined filesystem-paths to keep file-categories separately: - `y m ` – music (automatically chosen for `music.youtube.com`) - `y a ` – audiobooks ### soundcloud 1. occasional wav-files are converted to mp3 320kb/s 1. artist is set based on url (instead of having none by default) ### instagram - file-name is now username, video id, and nubmer of the video if there are multiple (instead of "Video by username", which refuses to download multiple videos from different id's: "Video by username.mp4 has already been downloaded") - TODO: explose playlist's `%(uploader_id)s`, `nr_current`, `nr_total` to the naming api