Pin `pytubefix==6.3.4` for YouTube fix (#14571)

pull/14574/head
Glenn Jocher 6 months ago committed by GitHub
parent 47ff2b4a76
commit 68f1f326f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      ultralytics/data/loaders.py

@ -545,7 +545,7 @@ def get_best_youtube_url(url, method="pytube"):
"""
if method == "pytube":
# Switched from pytube to pytubefix to resolve https://github.com/pytube/pytube/issues/1954
check_requirements("pytubefix")
check_requirements("pytubefix==6.3.4") # bug in 6.4.2 https://github.com/JuanBindez/pytubefix/issues/123
from pytubefix import YouTube
streams = YouTube(url).streams.filter(file_extension="mp4", only_video=True)

Loading…
Cancel
Save