我的代码昨天可以运行,但是当我尝试运行它时出现错误
from pytube import YouTube
#ask for the link from user
link = input("Enter the link of YouTube video you want to download: ")
yt = YouTube(link)
yt_streams = yt.streams
HTTPError Traceback (most recent call last)
<ipython-input-10-b722fa04aa86> in <module>()
7 yt = YouTube(link)
8
----> 9 yt_streams = yt.streams
12 frames
/usr/lib/python3.7/urllib/request.py in http_error_default(self, req, fp, code, msg, hdrs)
647 class HTTPDefaultErrorHandler(BaseHandler):
648 def http_error_default(self, req, fp, code, msg, hdrs):
--> 649 raise HTTPError(req.full_url, code, msg, hdrs, fp)
650
651 class HTTPRedirectHandler(BaseHandler):
HTTPError: HTTP Error 404: Not Found
这是我在使用 python 3.9.5 和 pytube 10.8.1 时遇到的错误
答案 0 :(得分:0)