]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/ustream.py
cfe3a6840af834a1f4740c7c4f7290c63b591096
3 from .common
import InfoExtractor
6 class UstreamIE(InfoExtractor
):
7 _VALID_URL
= r
'https?://www\.ustream\.tv/recorded/(?P<videoID>\d+)'
10 def _real_extract(self
, url
):
11 m
= re
.match(self
._VALID
_URL
, url
)
12 video_id
= m
.group('videoID')
14 video_url
= u
'http://tcdn.ustream.tv/video/%s' % video_id
15 webpage
= self
._download
_webpage
(url
, video_id
)
17 self
.report_extraction(video_id
)
19 video_title
= self
._html
_search
_regex
(r
'data-title="(?P<title>.+)"',
22 uploader
= self
._html
_search
_regex
(r
'data-content-type="channel".*?>(?P<uploader>.*?)</a>',
23 webpage
, u
'uploader', fatal
=False, flags
=re
.DOTALL
)
25 thumbnail
= self
._html
_search
_regex
(r
'<link rel="image_src" href="(?P<thumb>.*?)"',
26 webpage
, u
'thumbnail', fatal
=False)
34 'thumbnail': thumbnail
,