aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorFilippo Valsorda <filippo.valsorda@gmail.com>2013-10-28 02:34:29 -0400
committerFilippo Valsorda <filippo.valsorda@gmail.com>2013-10-28 02:34:29 -0400
commit8ffa13e03e995f2009d8240cbdc6ba7aba9d3759 (patch)
tree8495a14e26b753421342704ce3f1d91d999ddb7b /youtube_dl/extractor
parentdb477d3a37cbe5df5fd9151d557db33d8534e9f2 (diff)
[Instagram] get the non-https link, as they are serving Akamai cert from a instagram.com domain
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/common.py8
-rw-r--r--youtube_dl/extractor/instagram.py2
2 files changed, 5 insertions, 5 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py
index aaa5c24c8..8b067b48d 100644
--- a/youtube_dl/extractor/common.py
+++ b/youtube_dl/extractor/common.py
@@ -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
diff --git a/youtube_dl/extractor/instagram.py b/youtube_dl/extractor/instagram.py
index ddc42882a..213aac428 100644
--- a/youtube_dl/extractor/instagram.py
+++ b/youtube_dl/extractor/instagram.py
@@ -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),