mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-17 01:25:11 +00:00
Merge pull request #1987 from rzhxeo/blip
[GenericIE] Add support for embedded blip.tv
This commit is contained in:
commit
7ebc9dee69
1 changed files with 12 additions and 0 deletions
|
@ -222,6 +222,18 @@ def _real_extract(self, url):
|
||||||
'id': video_id,
|
'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
|
# Look for Bandcamp pages with custom domain
|
||||||
mobj = re.search(r'<meta property="og:url"[^>]*?content="(.*?bandcamp\.com.*?)"', webpage)
|
mobj = re.search(r'<meta property="og:url"[^>]*?content="(.*?bandcamp\.com.*?)"', webpage)
|
||||||
if mobj is not None:
|
if mobj is not None:
|
||||||
|
|
Loading…
Reference in a new issue