Pytube 给出“HTTP 错误 404:未找到”错误。有谁知道如何解决这个问题?

Moi*_*azz 1 python http-status-code-404 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!')
Run Code Online (Sandbox Code Playgroud)

错误:

HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 404: Not Found
Run Code Online (Sandbox Code Playgroud)

Ris*_*waj 9

这是一个已知的bugpytube

安装新版本的 pytube(2021 年 5 月 21 日发布)后,pip install pytube==10.8.2python -m pip install --upgrade pytube已修复。

  • 它不适合我。我能做什么? (3认同)