我一直试图使用Pytube模块,每次使用它的Client属性时,它都会出现以下错误:
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
client = pytube.Client('my-app-identifier')
AttributeError: 'module' object has no attribute 'Client'
发布于 2015-12-29 11:20:53
首先,最新版本 of pytube
(它与pip install pytube
一起安装)现在是版本6.1.5;所以您可能应该查看该版本的PyPI页面。PyPI页面上的简短文档没有提到Client
类;相反,主要API类是YouTube
,如下所示:
from pytube import YouTube
yt = YouTube("http://www.youtube.com/watch?v=Ik-RsDGPI5Y")
# Once set, you can see all the codec and quality options YouTube has made
# available for the perticular video by printing videos.
pprint(yt.get_videos())
读文档的“读文档”文档似乎是为一个完全不相关的项目编写的。据我所见,这个项目在PyPI上不可用。
发布于 2015-12-29 11:22:20
https://stackoverflow.com/questions/34516290
复制