]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[viewster] Tolerate missing synopsis (Closes #8274)
authorSergey M․ <dstftw@gmail.com>
Tue, 19 Jan 2016 18:02:46 +0000 (00:02 +0600)
committerSergey M․ <dstftw@gmail.com>
Tue, 19 Jan 2016 18:02:46 +0000 (00:02 +0600)
youtube_dl/extractor/viewster.py

index 185b1c1194f72122c99b26abd7ffb32d41934388..fe94a479339035dfd9a70386e903e5c3770fdfea 100644 (file)
@@ -155,10 +155,10 @@ class ViewsterIE(InfoExtractor):
 
         self._sort_formats(formats)
 
-        synopsis = info.get('Synopsis', {})
+        synopsis = info.get('Synopsis') or {}
         # Prefer title outside synopsis since it's less messy
         title = (info.get('Title') or synopsis['Title']).strip()
-        description = synopsis.get('Detailed') or info.get('Synopsis', {}).get('Short')
+        description = synopsis.get('Detailed') or (info.get('Synopsis') or {}).get('Short')
         duration = int_or_none(info.get('Duration'))
         timestamp = parse_iso8601(info.get('ReleaseDate'))