One of the greatest inventions https://github.com/mps-youtube/mps-youtube
Debian
sudo apt install python3-pip
sudo pip3 install mps-youtube
sudo pip3 install youtube-dl
Type mpsyt
to run it
After this you are able to search and download audio and video in Youtube.
For mpris2 support, install the python bindings for dbus and gobject
pip3 install dbus-python pygobject
Ubuntu
sudo apt install mps-youtube
Type mpsyt
to run it
Fedora
sudo pip3 install mps-youtube
Type mpsyt
to run it