1
0
mirror of https://github.com/l1ving/youtube-dl synced 2024-12-21 22:13:04 +08:00

[ustream] Add an alternative approach to extract title (fixes #5128)

This commit is contained in:
Yen Chi Hsuan 2015-04-23 18:24:44 +08:00
parent 762155cc90
commit 2a8137272d

View File

@ -58,7 +58,16 @@ class UstreamIE(InfoExtractor):
self.report_extraction(video_id) self.report_extraction(video_id)
video_title = self._html_search_regex(r'data-title="(?P<title>.+)"', video_title = self._html_search_regex(r'data-title="(?P<title>.+)"',
webpage, 'title') webpage, 'title', default=None)
if not video_title:
try:
video_title = params['moduleConfig']['meta']['title']
except KeyError:
pass
if not video_title:
video_title = 'Ustream video ' + video_id
uploader = self._html_search_regex(r'data-content-type="channel".*?>(?P<uploader>.*?)</a>', uploader = self._html_search_regex(r'data-content-type="channel".*?>(?P<uploader>.*?)</a>',
webpage, 'uploader', fatal=False, flags=re.DOTALL) webpage, 'uploader', fatal=False, flags=re.DOTALL)