From 894a93e318b40be26a368bf451aa82bc81c04f62 Mon Sep 17 00:00:00 2001 From: Ben Raymond Date: Fri, 22 Jul 2022 03:07:49 +1000 Subject: [PATCH] Fixes #199 (#203) --- utils/datasets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/datasets.py b/utils/datasets.py index 0cdc72cc..b6bb8b02 100644 --- a/utils/datasets.py +++ b/utils/datasets.py @@ -282,7 +282,7 @@ class LoadStreams: # multiple IP or RTSP cameras # Start the thread to read frames from the video stream print(f'{i + 1}/{n}: {s}... ', end='') url = eval(s) if s.isnumeric() else s - if 'youtube.com/' in url or 'youtu.be/' in url: # if source is YouTube video + if 'youtube.com/' in str(url) or 'youtu.be/' in str(url): # if source is YouTube video check_requirements(('pafy', 'youtube_dl')) import pafy url = pafy.new(url).getbest(preftype="mp4").url