aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/ustream.py
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2015-04-23 18:24:44 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2015-04-23 18:24:44 +0800
commit2a8137272d7d463648ccf53d25d78660209ad928 (patch)
treeb699e3b8ef58a40a6c7f82a949c327762ef9a703 /youtube_dl/extractor/ustream.py
parent762155cc90754fc29c68bf0f0256988f37862c3b (diff)
[ustream] Add an alternative approach to extract title (fixes #5128)
Diffstat (limited to 'youtube_dl/extractor/ustream.py')
-rw-r--r--youtube_dl/extractor/ustream.py11
1 files changed, 10 insertions, 1 deletions
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<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>',
webpage, 'uploader', fatal=False, flags=re.DOTALL)