Open akifd opened 7 years ago
See the error message: WARNING:root:pafy: youtube-dl not found; falling back to internal backend. This is not as well maintained as the youtube-dl backend. To hide this message, set the environmental variable PAFY_BACKEND to "internal".
Install youtube-dl. Since pafy calls it as as a library, you also need a version of youtube-dl matching the Python version.
For me what it worked was to uninstall both pafy and youtube-dl, and then reinstall them, first youtube-dl and after pafy
Installing youtube-dl is a good workaround for most situations, but the actual problem still lies in the internal youtube URL resolver in pafy. The issue and fix are described in this youtube-dl issue: (https://github.com/rg3/youtube-dl/issues/11894). It would be nice if the internal resolver was working, as I find it faster than youtube-dl for my needs (mopidy-youtube on a low-powered single board computer).
It is likely beyond me to port the youtube-dl fix to pafy but if this bug is still around in the not-too-distant future I will have a look.
the actual problem still lies in the internal youtube URL resolver in pafy
Indeed, but as you can see it breaks often and is not always easy to fix. PRs are welcome, of course. Help maintaining that code would be appreciated, since it is in fact helpful for low powered hardware, at least.
Most of the times when I try to fetch a video I get this error:
I tried setting my own API key, but that didn't help either. Occasionally it seems to work but most of the time it doesn't. I can't pin down why it's so random.
I also tried the following but these raised the same error: