From fa154d1dbe3c8dec53c227e3c19b586516e17c43 Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Fri, 21 Mar 2014 17:35:11 +0100 Subject: [PATCH] [videolectures.net] Make description optional --- youtube_dl/extractor/videolecturesnet.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/videolecturesnet.py b/youtube_dl/extractor/videolecturesnet.py index f8b946a88..ebd2a3dca 100644 --- a/youtube_dl/extractor/videolecturesnet.py +++ b/youtube_dl/extractor/videolecturesnet.py @@ -36,7 +36,10 @@ class VideoLecturesNetIE(InfoExtractor): smil = self._download_xml(smil_url, video_id) title = find_xpath_attr(smil, './/meta', 'name', 'title').attrib['content'] - description = find_xpath_attr(smil, './/meta', 'name', 'abstract').attrib['content'] + description_el = find_xpath_attr(smil, './/meta', 'name', 'abstract') + description = ( + None if description_el is None + else description_el.attrib['content']) upload_date = unified_strdate( find_xpath_attr(smil, './/meta', 'name', 'date').attrib['content']) -- 2.22.2