|ohnonot a7061dd5dd removal of online test, aftermath||3 months ago|
|.gitignore||4 months ago|
|LICENSE||6 months ago|
|README.md||4 months ago|
|mpv-clip||3 months ago|
|mytorsocks.sh||3 months ago|
|youtube-search||4 months ago|
|youtube-search.py||4 months ago|
A collection of scripts around searching & streaming youtube without a browser.
Essentially I want a representation of the first page of results of a youtube search, without the obnoxious "I agree" popups that started overlaying everything recently.
youtube-search is there for.
It will return familiar youtube page URLs (not the actual media URL) like "https://www.youtube.com/watch?v=XXXXXXXXXX" and copy those to the clipboard.
Then I use
mpv-clip to grab that URL from the clipboard and make mpv+youtube-dl play it.
To avoid youtube kicking me out or delaying me for refusing to use their web pages in a browser, I run
youtube-search through tor, with
mytorsocks.sh, but stream the actual video through the "normal" WWW. That is why the above described clipboard solution works best for me.
Nevertheless, it is possible to directly launch a program that deals with the URL (like a media player, or youtube-dl). When
youtube-search was launched with
mytorsocks.sh then this program will use the same tor connection.
mpv-clip also has an option to replace youtube.com with a mirror site such as those listed at invidio.us.
Here are two commands I have bound to two hotkeys, one to search, one to play:
xterm -e 'mytorsocks.sh youtube-search -m 10 -- "$(xclip -o)"' sh -c 'mpv-clip -y invidious.snopyta.org "$(xclip -o)"'
All scripts have a '-h' option that will explain its options and list dependencies.
A bash script that searches youtube for search terms entered on the command line.
youtube-dl (or a compatible executable),
perl and the
HTML::Entities module (part of the perl-html-parser package on ArchLinux) and
A wrapper around the glorious combination of mpv and youtube-dl which can play much more than just youtube links. It is meant to be used without a terminal, assigned to hotkeys, taking arguments from the clipboard & copying them there again, with metadata added. Heavily sending desktop notifications (can be disabled).
A wrapper script around torsocks that
mytorsocks.sh can be used with other applications, too. But torsocks itself does not work with all applications. My tests (Archlinux, Dec 2020) revealed that torsocks works with
but does not work with
Of course that list isn't complete.
A python script that searches youtube for entered search terms. It does not rely on youtube-dl. It is only a matter of time until it stops working. Kudos to teckk from LQ who put this in the public domain.
Everything in here is under the license described in the LICENSE file, unless otherwise mentioned.
Somehow include thumbnails, possibly by wrapping the whole thing in a GUI like Yad or Zenity.