Skip to main content

Posts

Showing posts from January, 2021

Search and Play Youtube Videos from the Terminal - yt

yt For a long time I've been searching for a command-line utility to search YouTube for videos and play them with mpv (or any other video player) without having to open the browser and the slow and bloated YouTube web-page. There exists many such tools like mps-youtube and youtube-viewer, but all of them require you to have a YouTube API key. Although using API makes the tool much more useful and adds many features, it has a major flaw, that is you cant search use it anymore if you exceed your daily API quota. Also, getting an API key and setting the tool up is a pain.  To combat this, I wrote a script myself that uses simple web-scraping using  grep. As it uses web-scraping, it doesn't need any API key to work, and can work out of the box perfectly. You dont even need to be logged in to use it. yt