【发布时间】:2021-09-07 00:48:40
【问题描述】:
当我尝试使用 get_highest_resolution() 函数在使用 pytube 下载时获得最高分辨率的视频。虽然它在一周前运行良好,但现在却导致错误。
from pytube import YouTube
yt = YouTube('https://youtube.com/watch?v=2lAe1cqCOXo')
ys = yt.streams.get_highest_resolution()
ys.download()
AttributeError : 'nonetype' 对象没有属性下载
虽然这很好用:
from pytube import YouTube
yt = YouTube('https://youtube.com/watch?v=2lAe1cqCOXo')
ys = yt.streams.first()
ys.download()
有谁知道使用 get_highest_resolution() 时出错的原因。
【问题讨论】:
标签: python python-3.x pytube