summary refs log tree commit diff
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-03-21 17:35:11 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2014-03-22 12:10:56 +0100
commitfa154d1dbe3c8dec53c227e3c19b586516e17c43 (patch)
tree059fbe287bcf01ef19ca2dae0803901559ee9729
parent7e2ede9891543c9ca85628b064f5e619e22d9597 (diff)
downloadyoutube-dl-fa154d1dbe3c8dec53c227e3c19b586516e17c43.tar.gz
youtube-dl-fa154d1dbe3c8dec53c227e3c19b586516e17c43.tar.xz
youtube-dl-fa154d1dbe3c8dec53c227e3c19b586516e17c43.zip
[videolectures.net] Make description optional
-rw-r--r--youtube_dl/extractor/videolecturesnet.py5
1 files changed, 4 insertions, 1 deletions
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'])