5 from .common import InfoExtractor
7 class WeiboIE(InfoExtractor):
9 The videos in Weibo come from different sites, this IE just finds the link
10 to the external video and returns it.
12 _VALID_URL = r'https?://video\.weibo\.com/v/weishipin/t_(?P<id>.+?)\.htm'
15 u'url': u'http://video.weibo.com/v/weishipin/t_zjUw2kZ.htm',
16 u'file': u'98322879.flv',
18 u'title': u'魔声耳机最新广告“All Eyes On Us”',
20 u'note': u'Sina video',
22 u'skip_download': True,
26 # Additional example videos from different sites
27 # Youku: http://video.weibo.com/v/weishipin/t_zQGDWQ8.htm
28 # 56.com: http://video.weibo.com/v/weishipin/t_zQ44HxN.htm
30 def _real_extract(self, url):
31 mobj = re.match(self._VALID_URL, url, flags=re.VERBOSE)
32 video_id = mobj.group('id')
33 webpage = self._download_webpage(url, video_id)
34 player_url = self._search_regex(r'var defaultPlayer="(.+?)"', webpage,
36 return self.url_result(player_url)