From 99c83eb331f863d2c5c44c67bbb6be192bef95b8 Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Sun, 25 Jul 2021 18:32:05 +0000 Subject: [PATCH] Handle optional slash in generic watch matcher --- youtube-extract | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube-extract b/youtube-extract index bd721e5..e1d68bb 100755 --- a/youtube-extract +++ b/youtube-extract @@ -80,7 +80,7 @@ videoPattern = '|'.join([ r'/www\.youtube\.com/(my_videos_)?edit\?(.*&)?video_id=[0-9A-Za-z_-]{11}', r'/www\.youtube\.com/(all_comments|attribution|cthru|get_endscreen|livestreaming/dashboard)\?(.*&)?v=[0-9A-Za-z_-]{11}', # Generic v parameter on watch URLs including with percent encoding; this covers e.g. google.com/url?... or the oEmbed - r'/watch\?(.*&)?v=[0-9A-Za-z_-]{11}', + r'/watch/?\?(.*&)?v=[0-9A-Za-z_-]{11}', ])