You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently trying to make the Youtube search (and I guess play), so I thought it might be interesting to share my progress with others here, until I reach the point where I'll do a PR (if I have time).
First thing I've done is to change the Youtube API key that is in the mopidy-youtube package by one of my own. Just search Google API console, create a new project, then add an API and select the Youtube API data V3 API. The file you have to edit after that is located at `/usr/local/lib/python2.7/dist-packages/mopidy_youtube/backend.py :
The second step is to update pafy and youtube-dl. Below the process with some trials in between and confirmation that the package works after the updates :
root@MusicBox:~# ytdl B31Vgqytoa4
ERROR: B31Vgqytoa4: YouTube said: HTTP is not supported.
Traceback (most recent call last):
File "/usr/local/bin/ytdl", line 199, in<module>main()
File "/usr/local/bin/ytdl", line 141, in main
vid = pafy.new(args.url)
File "/usr/local/lib/python2.7/dist-packages/pafy/pafy.py", line 124, in new
return Pafy(url, basic, gdata, size, callback, ydl_opts)
File "/usr/local/lib/python2.7/dist-packages/pafy/backend_youtube_dl.py", line 29, in __init__
super(YtdlPafy, self).__init__(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pafy/backend_shared.py", line 96, in __init__
self._fetch_basic()
File "/usr/local/lib/python2.7/dist-packages/pafy/backend_youtube_dl.py", line 41, in _fetch_basic
raise IOError(str(e).replace('YouTube said', 'Youtube says'))
IOError: ERROR: B31Vgqytoa4: Youtube says: HTTP is not supported.
root@MusicBox:~#
root@MusicBox:~#
root@MusicBox:~#
root@MusicBox:~# sudo pip install --upgrade pafy
/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/primitives/constant_time.py:26: CryptographyDeprecationWarning: Support for your Python version is deprecated. The next version of cryptography will remove support. Please upgrade to a 2.7.x release that supports hmac.compare_digest as soon as possible.
utils.DeprecatedIn23,
/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/bindings/openssl/binding.py:163: CryptographyDeprecationWarning: OpenSSL version 1.0.1 is no longer supported by the OpenSSL project, please upgrade. A future version of cryptography will drop support for it.
utils.CryptographyDeprecationWarning
Collecting pafy
Downloading https://files.pythonhosted.org/packages/74/69/829919eeadff695338f98fa12bb99e45490761a2010c8d688d88b6df194a/pafy-0.5.5-py2.py3-none-any.whl
Installing collected packages: pafy
Found existing installation: pafy 0.5.4
Uninstalling pafy-0.5.4:
Successfully uninstalled pafy-0.5.4
Successfully installed pafy-0.5.5
You are using pip version 18.1, however version 20.2b1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
root@MusicBox:~#
root@MusicBox:~#
root@MusicBox:~#
root@MusicBox:~# ytdl B31Vgqytoa4
ERROR: B31Vgqytoa4: YouTube said: Invalid parameters.
Traceback (most recent call last):
File "/usr/local/bin/ytdl", line 209, in<module>main()
File "/usr/local/bin/ytdl", line 151, in main
vid = pafy.new(args.url)
File "/usr/local/lib/python2.7/dist-packages/pafy/pafy.py", line 124, in new
return Pafy(url, basic, gdata, size, callback, ydl_opts=ydl_opts)
File "/usr/local/lib/python2.7/dist-packages/pafy/backend_youtube_dl.py", line 31, in __init__
super(YtdlPafy, self).__init__(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pafy/backend_shared.py", line 97, in __init__
self._fetch_basic()
File "/usr/local/lib/python2.7/dist-packages/pafy/backend_youtube_dl.py", line 43, in _fetch_basic
raise IOError(str(e).replace('YouTube said', 'Youtube says'))
IOError: ERROR: B31Vgqytoa4: Youtube says: Invalid parameters.
root@MusicBox:~#
root@MusicBox:~#
root@MusicBox:~#
root@MusicBox:~# sudo pip install --upgrade youtube-dl==2020.06.16.1
/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/primitives/constant_time.py:26: CryptographyDeprecationWarning: Support for your Python version is deprecated. The next version of cryptography will remove support. Please upgrade to a 2.7.x release that supports hmac.compare_digest as soon as possible.
utils.DeprecatedIn23,
/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/bindings/openssl/binding.py:163: CryptographyDeprecationWarning: OpenSSL version 1.0.1 is no longer supported by the OpenSSL project, please upgrade. A future version of cryptography will drop support for it.
utils.CryptographyDeprecationWarning
Collecting youtube-dl==2020.06.16.1
Downloading https://files.pythonhosted.org/packages/a4/5f/db1fb30596fbfabd3500e741cd9c73d0cb1d25387582fd21289bed05a9c2/youtube_dl-2020.6.16.1-py2.py3-none-any.whl (1.8MB)
100% |################################| 1.8MB 907kB/s
Installing collected packages: youtube-dl
Found existing installation: youtube-dl 2019.1.2
Uninstalling youtube-dl-2019.1.2:
Successfully uninstalled youtube-dl-2019.1.2
Successfully installed youtube-dl-2020.6.16.1
You are using pip version 18.1, however version 20.2b1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
root@MusicBox:~#
root@MusicBox:~#
root@MusicBox:~#
root@MusicBox:~# ytdl 4XUipCxjmmw
Stream Type Format Quality Size
------ ---- ------ ------- ----
1 normal mp4 [540x360] 272 MB
2 audio webm [160k] 56 MB
3 audio m4a [128k] 55 MB
4 audio webm [70k] 28 MB
5 audio webm [50k] 21 MB
root@MusicBox:~#
And well, it seems to work for the search, stay tuned for making sure that it actually works when trying to play a thune
The text was updated successfully, but these errors were encountered:
Hello !
I'm currently trying to make the Youtube search (and I guess play), so I thought it might be interesting to share my progress with others here, until I reach the point where I'll do a PR (if I have time).
First thing I've done is to change the Youtube API key that is in the mopidy-youtube package by one of my own. Just search Google API console, create a new project, then add an API and select the Youtube API data V3 API. The file you have to edit after that is located at `/usr/local/lib/python2.7/dist-packages/mopidy_youtube/backend.py :
The second step is to update pafy and youtube-dl. Below the process with some trials in between and confirmation that the package works after the updates :
And well, it seems to work for the search, stay tuned for making sure that it actually works when trying to play a thune
The text was updated successfully, but these errors were encountered: