From: Jai Grimshaw Date: Fri, 30 Aug 2013 15:53:01 +0000 (+1000) Subject: Fixed issue #1277 KeyError when no description. X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=b3f0e5304807862ce72c136da90b860df805ee5c;p=youtube-dl.git Fixed issue #1277 KeyError when no description. Allows a continue with a warning when an extractor cannot retrieve a description. --- diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index b289bd9e2..afce28040 100644 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -492,6 +492,8 @@ class YoutubeDL(object): self.report_writedescription(descfn) with io.open(encodeFilename(descfn), 'w', encoding='utf-8') as descfile: descfile.write(info_dict['description']) + except (KeyError, TypeError): + self.report_warning(u'Cannot extract description.') except (OSError, IOError): self.report_error(u'Cannot write description file ' + descfn) return