Browse Source

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

totalwebcasting
Yen Chi Hsuan 10 years ago
parent
commit
2a8137272d
1 changed files with 10 additions and 1 deletions
  1. +10
    -1
      youtube_dl/extractor/ustream.py

+ 10
- 1
youtube_dl/extractor/ustream.py View File

@ -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)


Loading…
Cancel
Save