I'm trying to use the Pafy library in Python, so i just followed the documentation and tried to create new Pafy object:
>>> import pafy
>>> myvid=pafy.new("https://youtu.be/kXYiU_JCYtU")
but i got the message like
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
myvid=pafy.new("https://youtu.be/kXYiU_JCYtU")
File "C:\Python\lib\site-packages\pafy\pafy.py", line 125, in new
return Pafy(url, basic, gdata, signature, size, callback, ydl_opts)
File "C:\Python\lib\site-packages\pafy\backend_youtube_dl.py", line 29, in __init__
super(YtdlPafy, self).__init__(*args, **kwargs)
File "C:\Python\lib\site-packages\pafy\backend_shared.py", line 95, in __init__
self._fetch_basic()
File "C:\Python\lib\site-packages\pafy\backend_youtube_dl.py", line 53, in _fetch_basic
self._category = self._ydl_info['categories'][0]
TypeError: 'NoneType' object is not subscriptable
Does anyone know how to fix it?