Pytube 给出 "HTTP Error 404: Not Found" 错误。任何人都知道如何解决这个问题?
Pytube givng an "HTTP Error 404: Not Found" error. Anyone knows how to fix this?
我在尝试使用 pytube
包从 YouTube 下载视频时遇到问题。
我遇到 "HTTP Error 404: Not Found"
错误。有人熟悉这个错误吗?我一直在尝试对此进行研究,但尚未找到导致问题的任何原因。
我将分享我的代码和下面的错误:
from pytube import YouTube
video = YouTube("https://youtu.be/sflWFZKFJgk")
print(video.title)
print("downloading...")
video.streams.get_highest_resolution().download()
print('Downloaded successfully!')
错误:
HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 404: Not Found
这是 a known bug 和 pytube
。
python -m pip install --upgrade pytube
它已修复。
先卸载pytube
python -m pip uninstall pytube pytube3 pytubex
并安装最新的
python -m pip install git+https://github.com/nficano/pytube
这里有人成功使用了最新版本的pytube。
我已经完成了 https://pypi.org/project/pytube/ and https://github.com/nficano/pytube 的所有步骤,但仍然出现错误 _execute_request
您是否已在 Python 3.8.5 上测试过它?
版本 10.8.5 解决了这个问题。升级
python -m pip install --upgrade pytube
我在尝试使用 pytube
包从 YouTube 下载视频时遇到问题。
我遇到 "HTTP Error 404: Not Found"
错误。有人熟悉这个错误吗?我一直在尝试对此进行研究,但尚未找到导致问题的任何原因。
我将分享我的代码和下面的错误:
from pytube import YouTube
video = YouTube("https://youtu.be/sflWFZKFJgk")
print(video.title)
print("downloading...")
video.streams.get_highest_resolution().download()
print('Downloaded successfully!')
错误:
HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 404: Not Found
这是 a known bug 和 pytube
。
python -m pip install --upgrade pytube
它已修复。
先卸载pytube
python -m pip uninstall pytube pytube3 pytubex
并安装最新的
python -m pip install git+https://github.com/nficano/pytube
这里有人成功使用了最新版本的pytube。 我已经完成了 https://pypi.org/project/pytube/ and https://github.com/nficano/pytube 的所有步骤,但仍然出现错误 _execute_request
您是否已在 Python 3.8.5 上测试过它?
版本 10.8.5 解决了这个问题。升级
python -m pip install --upgrade pytube