From ffa9e0a38e5b48a6fdda8b60b1d6722d8fa0348b Mon Sep 17 00:00:00 2001 From: Barbara Miller Date: Mon, 15 Jul 2019 18:47:46 -0700 Subject: [PATCH 1/2] support recent (2019) squarespace embeds --- youtube_dl/extractor/youtube.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index a87a46b3b..d045f3f1c 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -1558,13 +1558,14 @@ class YoutubeIE(YoutubeBaseInfoExtractor): for mobj in re.finditer(r'''(?x) (?: ]+?src=| + <iframe[^>]+?src=| data-video-url=| ]+?src=| embedSWF\(?:\s*| ]+data=| new\s+SWFObject\( ) - (["\']) + (["\']|\") (?P(?:https?:)?//(?:www\.)?youtube(?:-nocookie)?\.com/ (?:embed|v|p)/[0-9A-Za-z_-]{11}.*?) \1''', webpage)] From afe22563addf467115dc37edeb404a256ac8e1d1 Mon Sep 17 00:00:00 2001 From: Barbara Miller Date: Mon, 15 Jul 2019 21:55:57 -0700 Subject: [PATCH 2/2] more concise --- youtube_dl/extractor/youtube.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index d045f3f1c..6810411cb 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -1557,8 +1557,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor): unescapeHTML(mobj.group('url')) for mobj in re.finditer(r'''(?x) (?: - ]+?src=| - <iframe[^>]+?src=| + (?:<|<)iframe[^>]+?src=| data-video-url=| ]+?src=| embedSWF\(?:\s*|