From 56f21d1fc04e1fb4c544ebc7b6d03d260f569bd5 Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Sun, 25 Jul 2021 18:36:38 +0000 Subject: [PATCH] Add aggressive video ID v parameter extraction --- youtube-extract | 2 ++ 1 file changed, 2 insertions(+) diff --git a/youtube-extract b/youtube-extract index e1d68bb..2582c8b 100755 --- a/youtube-extract +++ b/youtube-extract @@ -81,6 +81,8 @@ videoPattern = '|'.join([ 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}', + # Generic v parameter on anything + r'[?&]v=[0-9A-Za-z_-]{11}(?=&|$)', ])