[generic] Extract Instagram embeds (#8817)
authorYen Chi Hsuan <yan12125@gmail.com>
Thu, 24 Mar 2016 08:32:27 +0000 (16:32 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Thu, 24 Mar 2016 08:32:27 +0000 (16:32 +0800)
youtube_dl/extractor/generic.py

index 93e0563b584f79076d05842d21ea8557aade0055..12f2309fc98fb99d56c961621c863fb92cb99cc9 100644 (file)
@@ -59,6 +59,7 @@ from .videomore import VideomoreIE
 from .googledrive import GoogleDriveIE
 from .jwplatform import JWPlatformIE
 from .digiteka import DigitekaIE
+from .instagram import InstagramIE
 
 
 class GenericIE(InfoExtractor):
@@ -1917,6 +1918,11 @@ class GenericIE(InfoExtractor):
             return self.url_result(
                 self._proto_relative_url(unescapeHTML(mobj.group(1))), 'Vine')
 
+        # Look for Instagram embeds
+        instagram_embed_url = InstagramIE._extract_embed_url(webpage)
+        if instagram_embed_url is not None:
+            return self.url_result(instagram_embed_url, InstagramIE.ie_key())
+
         def check_video(vurl):
             if YoutubeIE.suitable(vurl):
                 return True