projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
762155c
)
[ustream] Add an alternative approach to extract title (fixes #5128)
author
Yen Chi Hsuan
<yan12125@gmail.com>
Thu, 23 Apr 2015 10:24:44 +0000
(18:24 +0800)
committer
Yen Chi Hsuan
<yan12125@gmail.com>
Thu, 23 Apr 2015 10:24:44 +0000
(18:24 +0800)
youtube_dl/extractor/ustream.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/ustream.py
b/youtube_dl/extractor/ustream.py
index f8893b6cdc1dd7adbf7143bfdf6d5e7f604f3e98..a395dc5dac85d0dabe5aea59e25275942f7e28a8 100644
(file)
--- 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>.+)"',
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)
uploader = self._html_search_regex(r'data-content-type="channel".*?>(?P<uploader>.*?)</a>',
webpage, 'uploader', fatal=False, flags=re.DOTALL)