aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/livestream.py
diff options
context:
space:
mode:
authorCharles Chen <chaochichen@gmail.com>2014-07-22 14:44:38 -0700
committerCharles Chen <chaochichen@gmail.com>2014-07-22 14:44:38 -0700
commitc4f731262dbee921147b94aac5035b5d9ec75502 (patch)
tree98a93f1de2b7c71a8e25fa072515b4efc5f43ea1 /youtube_dl/extractor/livestream.py
parent07cc63f386c6afe253b7707631663072d2fb8789 (diff)
parente42a692f003eabdb1efad7b9f4b10ce97c712d32 (diff)
Merge remote-tracking branch 'upstream/master' into MLB
Conflicts: youtube_dl/extractor/mlb.py
Diffstat (limited to 'youtube_dl/extractor/livestream.py')
-rw-r--r--youtube_dl/extractor/livestream.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/youtube_dl/extractor/livestream.py b/youtube_dl/extractor/livestream.py
index 2c100d424..1ea1bbab4 100644
--- a/youtube_dl/extractor/livestream.py
+++ b/youtube_dl/extractor/livestream.py
@@ -28,11 +28,13 @@ class LivestreamIE(InfoExtractor):
}
def _extract_video_info(self, video_data):
- video_url = video_data.get('progressive_url_hd') or video_data.get('progressive_url')
+ video_url = (
+ video_data.get('progressive_url_hd') or
+ video_data.get('progressive_url')
+ )
return {
'id': compat_str(video_data['id']),
'url': video_url,
- 'ext': 'mp4',
'title': video_data['caption'],
'thumbnail': video_data['thumbnail_url'],
'upload_date': video_data['updated_at'].replace('-', '')[:8],
@@ -50,7 +52,8 @@ class LivestreamIE(InfoExtractor):
r'window.config = ({.*?});', webpage, 'window config')
info = json.loads(config_json)['event']
videos = [self._extract_video_info(video_data['data'])
- for video_data in info['feed']['data'] if video_data['type'] == 'video']
+ for video_data in info['feed']['data']
+ if video_data['type'] == 'video']
return self.playlist_result(videos, info['id'], info['full_name'])
else:
og_video = self._og_search_video_url(webpage, 'player url')