嗨,我正在使用python youtube下载程序,这是一项非常简单的任务。我使用pytube有一段时间了,从未遇到过这个错误。我的代码如下:
from pytube import YouTube
import pytube
yt_title = YouTube('https://www.youtube.com/watch?v=ZjDZrReZ4EI').title
ytd = YouTube('https://www.youtube.com/watch?v=ZjDZrReZ4EI').streams.first().download()
im获取的错误消息是:
Traceback (most recent call last):
File ".\test.py", line 5, in <module>
ytd = YouTube('https://www.youtube.com/watch?v=ZjDZrReZ4EI').streams.first().download()
AttributeError: 'NoneType' object has no attribute 'download'
这些是特殊情况:
Name: pytube
Version: 10.0.0
Summary: Python 3 library for downloading YouTube Videos.
Home-page: https://github.com/nficano/pytube
Author: Nick Ficano, Harold Martin
Author-email: nficano@gmail.com, harold.martin@gmail.com
License: MIT
Location: 'location of the package'
Requires: typing-extensions
Required-by:
im使用的视频为: https://www.youtube.com/watch?v=ZjDZrReZ4EI
我意识到一些我在几个小时前就可以下载的视频现在我无法下载了
我刚刚卸载了pytube并安装了pytube3。但现在我得到了以下错误:
pytube.exceptions.RegexMatchError: get_ytplayer_config: could not find match
for config_patterns
它不允许我下载任何视频
您必须卸载pytube并使用pip安装pytube 3。如果它不工作,那么打印流,看看你是否得到流
相关问题 更多 >
编程相关推荐