about summary refs log tree commit diff
path: root/youtube_dl/extractor/ninegag.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-09-23 01:46:40 +0600
committerSergey M․ <dstftw@gmail.com>2015-09-23 01:46:40 +0600
commit8ca2e93e1ab3485946df19d56a87e56699b2a712 (patch)
tree3058734576979b89d7a7b3f5e8730a059722973c /youtube_dl/extractor/ninegag.py
parent5600e214c3b63e3e2a0862bea230026c02073d7a (diff)
downloadyoutube-dl-8ca2e93e1ab3485946df19d56a87e56699b2a712.tar.gz
youtube-dl-8ca2e93e1ab3485946df19d56a87e56699b2a712.tar.xz
youtube-dl-8ca2e93e1ab3485946df19d56a87e56699b2a712.zip
[9gag] Relax optional fields
Diffstat (limited to 'youtube_dl/extractor/ninegag.py')
-rw-r--r--youtube_dl/extractor/ninegag.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/extractor/ninegag.py b/youtube_dl/extractor/ninegag.py
index 692cc3368..6daae7318 100644
--- a/youtube_dl/extractor/ninegag.py
+++ b/youtube_dl/extractor/ninegag.py
@@ -70,8 +70,8 @@ class NineGagIE(InfoExtractor):
             source_url = self._EXTERNAL_VIDEO_PROVIDER[external_video_provider]['url'] % external_video_id
             ie_key = self._EXTERNAL_VIDEO_PROVIDER[external_video_provider]['ie_key']
         title = post_view['title']
-        description = post_view['description']
-        view_count = str_to_int(post_view['externalView'])
+        description = post_view.get('description')
+        view_count = str_to_int(post_view.get('externalView'))
         thumbnail = post_view.get('thumbnail_700w') or post_view.get('ogImageUrl') or post_view.get('thumbnail_300w')
 
         return {