1

我正在尝试使用 cv2 处理从 Pafy 下载的 YouTube 视频,但每当我尝试使用“webm”格式时,getbest() 总是返回“NoneType”。知道为什么或如何解决它吗?谢谢。

AttributeError                            Traceback (most recent call last)
<ipython-input-45-6ab69c00964e> in <module>()

      5 video = urlPafy.getbest(preftype="webm")
      6 
----> 7 test = cv2.VideoCapture(video.url)
      8 test_frames = []
      9 
 
 AttributeError: 'NoneType' object has no attribute 'url'
4

0 回答 0