From c23533a100eb0a383b60ed2e5990602e9318fe4b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sergey=20M=E2=80=A4?= Date: Sat, 16 Apr 2016 22:31:05 +0600 Subject: [PATCH] [instagram] Add support for iframe embeds --- youtube_dl/extractor/instagram.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/youtube_dl/extractor/instagram.py b/youtube_dl/extractor/instagram.py index 3a5dd14e6..3cbe77ad8 100644 --- a/youtube_dl/extractor/instagram.py +++ b/youtube_dl/extractor/instagram.py @@ -45,6 +45,12 @@ class InstagramIE(InfoExtractor): @staticmethod def _extract_embed_url(webpage): + mobj = re.search( + r']+src=(["\'])(?P(?:https?:)?//(?:www\.)?instagram\.com/p/[^/]+/embed.*?)\1', + webpage) + if mobj: + return mobj.group('url') + blockquote_el = get_element_by_attribute( 'class', 'instagram-media', webpage) if blockquote_el is None: -- 2.40.0