[Instagram] get the non-https link, as they are serving Akamai cert from a instagram...
authorFilippo Valsorda <filippo.valsorda@gmail.com>
Mon, 28 Oct 2013 06:34:29 +0000 (02:34 -0400)
committerFilippo Valsorda <filippo.valsorda@gmail.com>
Mon, 28 Oct 2013 06:34:29 +0000 (02:34 -0400)
youtube_dl/extractor/common.py
youtube_dl/extractor/instagram.py

index aaa5c24c8565fffb85295188daf7bbd52f5aae89..8b067b48d7d81d5fb2ab102ea745695183c2be30 100644 (file)
@@ -318,10 +318,10 @@ class InfoExtractor(object):
     def _og_search_title(self, html, **kargs):
         return self._og_search_property('title', html, **kargs)
 
-    def _og_search_video_url(self, html, name='video url', **kargs):
-        return self._html_search_regex([self._og_regex('video:secure_url'),
-                                        self._og_regex('video')],
-                                       html, name, **kargs)
+    def _og_search_video_url(self, html, name='video url', secure=True, **kargs):
+        regexes = [self._og_regex('video')]
+        if secure: regexes.insert(0, self._og_regex('video:secure_url'))
+        return self._html_search_regex(regexes, html, name, **kargs)
 
     def _rta_search(self, html):
         # See http://www.rtalabel.org/index.php?content=howtofaq#single
index ddc42882a436a216cbd24b0b28d03da89ec27b0d..213aac428451bfcb860585b26de0e1c43abc732d 100644 (file)
@@ -26,7 +26,7 @@ class InstagramIE(InfoExtractor):
 
         return [{
             'id':        video_id,
-            'url':       self._og_search_video_url(webpage),
+            'url':       self._og_search_video_url(webpage, secure=False),
             'ext':       'mp4',
             'title':     u'Video by %s' % uploader_id,
             'thumbnail': self._og_search_thumbnail(webpage),