3 from .common import InfoExtractor
6 class UstreamIE(InfoExtractor):
7 _VALID_URL = r'https?://www\.ustream\.tv/recorded/(?P<videoID>\d+)'
10 u'url': u'http://www.ustream.tv/recorded/20274954',
11 u'file': u'20274954.flv',
12 u'md5': u'088f151799e8f572f84eb62f17d73e5c',
14 u"uploader": u"Young Americans for Liberty",
15 u"title": u"Young Americans for Liberty February 7, 2012 2:28 AM"
19 def _real_extract(self, url):
20 m = re.match(self._VALID_URL, url)
21 video_id = m.group('videoID')
23 video_url = u'http://tcdn.ustream.tv/video/%s' % video_id
24 webpage = self._download_webpage(url, video_id)
26 self.report_extraction(video_id)
28 video_title = self._html_search_regex(r'data-title="(?P<title>.+)"',
31 uploader = self._html_search_regex(r'data-content-type="channel".*?>(?P<uploader>.*?)</a>',
32 webpage, u'uploader', fatal=False, flags=re.DOTALL)
34 thumbnail = self._html_search_regex(r'<link rel="image_src" href="(?P<thumb>.*?)"',
35 webpage, u'thumbnail', fatal=False)
43 'thumbnail': thumbnail,