summary refs log tree commit diff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-05-31 03:01:41 +0600
committerSergey M․ <dstftw@gmail.com>2015-05-31 03:01:41 +0600
commit7584e38ce4e98e0e9abca146a513d215701308e2 (patch)
treedf7b03ae6f183713a618f59587a2fb8cacc519f3
parenteb47569f8a6017190d73429b3ef54c1ffaf201dc (diff)
downloadyoutube-dl-7584e38ce4e98e0e9abca146a513d215701308e2.tar.gz
youtube-dl-7584e38ce4e98e0e9abca146a513d215701308e2.tar.xz
youtube-dl-7584e38ce4e98e0e9abca146a513d215701308e2.zip
[tvigle] Modernize
-rw-r--r--youtube_dl/extractor/tvigle.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/youtube_dl/extractor/tvigle.py b/youtube_dl/extractor/tvigle.py
index 4e95bd30f..a85693888 100644
--- a/youtube_dl/extractor/tvigle.py
+++ b/youtube_dl/extractor/tvigle.py
@@ -64,8 +64,8 @@ class TvigleIE(InfoExtractor):
         item = video_data['playlist']['items'][0]
 
         title = item['title']
-        description = item['description']
-        thumbnail = item['thumbnail']
+        description = item.get('description')
+        thumbnail = item.get('thumbnail')
         duration = float_or_none(item.get('durationMilliseconds'), 1000)
         age_limit = parse_age_limit(item.get('ageRestrictions'))
 
@@ -83,7 +83,7 @@ class TvigleIE(InfoExtractor):
                     'format_id': '%s-%s' % (vcodec, format_id),
                     'vcodec': vcodec,
                     'height': int_or_none(height),
-                    'filesize': item['video_files_size'][vcodec][format_id],
+                    'filesize': int_or_none(item.get('video_files_size', {}).get(vcodec, {}).get(format_id)),
                 })
         self._sort_formats(formats)