diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2013-12-16 11:28:34 -0800 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2013-12-16 11:28:34 -0800 |
commit | 7ebc9dee69ac776aee3cc6d3e589d3100cff9a88 (patch) | |
tree | 8a8e0d2af8751843806ed97e3e83757b1320a0c4 /youtube_dl/extractor | |
parent | e9c424c144c5d82e95a3b9a33048126a3c61043a (diff) | |
parent | ee3e63e477c12591bbfcb6f13382397139900d44 (diff) |
Merge pull request #1987 from rzhxeo/blip
[GenericIE] Add support for embedded blip.tv
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r-- | youtube_dl/extractor/generic.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py index 216e03218..a7ea9f733 100644 --- a/youtube_dl/extractor/generic.py +++ b/youtube_dl/extractor/generic.py @@ -222,6 +222,18 @@ class GenericIE(InfoExtractor): 'id': video_id, } + # Look for embedded blip.tv player + mobj = re.search(r'<meta\s[^>]*https?://api.blip.tv/\w+/redirect/\w+/(\d+)', webpage) + if mobj: + return self.url_result('http://blip.tv/seo/-'+mobj.group(1), 'BlipTV') + mobj = re.search(r'<(?:iframe|embed|object)\s[^>]*https?://(?:\w+\.)?blip.tv/(?:play/|api\.swf#)([a-zA-Z0-9]+)', webpage) + if mobj: + player_url = 'http://blip.tv/play/%s.x?p=1' % mobj.group(1) + player_page = self._download_webpage(player_url, mobj.group(1)) + blip_video_id = self._search_regex(r'data-episode-id="(\d+)', player_page, u'blip_video_id', fatal=False) + if blip_video_id: + return self.url_result('http://blip.tv/seo/-'+blip_video_id, 'BlipTV') + # Look for Bandcamp pages with custom domain mobj = re.search(r'<meta property="og:url"[^>]*?content="(.*?bandcamp\.com.*?)"', webpage) if mobj is not None: |