From: Yen Chi Hsuan Date: Thu, 23 Apr 2015 10:24:44 +0000 (+0800) Subject: [ustream] Add an alternative approach to extract title (fixes #5128) X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=2a8137272d7d463648ccf53d25d78660209ad928;p=youtube-dl [ustream] Add an alternative approach to extract title (fixes #5128) --- diff --git a/youtube_dl/extractor/ustream.py b/youtube_dl/extractor/ustream.py index f8893b6cd..a395dc5da 100644 --- a/youtube_dl/extractor/ustream.py +++ b/youtube_dl/extractor/ustream.py @@ -58,7 +58,16 @@ class UstreamIE(InfoExtractor): self.report_extraction(video_id) video_title = self._html_search_regex(r'data-title="(?P.+)"', - 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>', webpage, 'uploader', fatal=False, flags=re.DOTALL)