YouTube search and download script

I would like to share two convenience scripts which others may find useful. They are tuned for my setup, so it uses urxvtc as the terminal, and defaults to downloading to a “Download” folder, but it will be easy enough to change the terminal used and other assumed defaults.

I think the FvwmScripts module is underrated, as it allows all sorts of quick convenient functions to be put into the GUI.

One script is a simple one, which calls aria2c to download whatever URL is in the X primary selection. Sometimes if downloading a larger file, I don’t like to do it using the browser, and this makes it easy to download the file using aria2c without having to copy/paste or manually enter a terminal command.

The second is a front end to YouTube Fuzzy Search Finder, so you will need that installed, as well as dmenu, xsel, mpv and youtube-dl. Usually, when I want to listen to a YouTube podcast, I download the audio only, then play the audio in audacious. Instead of copying/pasting the URL into a terminal, invoking youtube-dl with the correct parameters, this script does it all for me simply by calling it with a key-binding with the URL selected in the browser. Just select the URL, bring up the form, click “Audio only” and click “Download”, and your YouTube podcast will be downloaded to an opus file.

You can also simply enter some search terms into the form, and you’ll get a menu of search results where you can select a video to play using MPV. Now you can search and play YouTube videos without a browser! But more than this, when the script is started, it will populate the URL field with the X primary selection, and also allow you to download it, either full video, or audio only, using youtube-dl. You can also put the URL of the video you searched for here.

They are simple, but it makes some common simple tasks much simpler.

Here are download links

1 Like

Hello all,

I have updated the scripts, mainly by adding a third, FvwmScript-Daria. This is a basic front end for aria2c.

Aria2c is a download utility which can run as a daemon. When running as a daemon with RPC enabled (aria2c --enable-rpc=true -D), you can use FvwmScript-Daria to manage your downloads!

It’s a basic front end, and when aria2 is configured correctly, it will remember your download sessions among logins. If you want a fully featured frontend try something else, but this is designed for FAST, basic management.

Git repository here