Update YouTube URL https://youtu.be/LNwODJXcvt4 (#12106)
Update example YouTube URL
This commit is contained in:
1 parent
a6659d0505
commit
ec690e42af
9 files changed
+9
-9
No files matched your search
@@ -355,7 +355,7 @@ class LoadStreams:
|
||||
# Start thread to read frames from video stream
|
||||
st = f'{i + 1}/{n}: {s}... '
|
||||
if urlparse(s).hostname in ('www.youtube.com', 'youtube.com', 'youtu.be'): # if source is YouTube video
|
||||
# YouTube format i.e. 'https://www.youtube.com/watch?v=Zgi9g1ksQHc' or 'https://youtu.be/Zgi9g1ksQHc'
|
||||
# YouTube format i.e. 'https://www.youtube.com/watch?v=Zgi9g1ksQHc' or 'https://youtu.be/LNwODJXcvt4'
|
||||
check_requirements(('pafy', 'youtube_dl==2020.12.2'))
|
||||
import pafy
|
||||
s = pafy.new(s).getbest(preftype='mp4').url # YouTube URL
|
||||
|
||||
Reference in new issue
Block a user