]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[videolectures.net] Make description optional
authorPhilipp Hagemeister <phihag@phihag.de>
Fri, 21 Mar 2014 16:35:11 +0000 (17:35 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Sat, 22 Mar 2014 11:10:56 +0000 (12:10 +0100)
youtube_dl/extractor/videolecturesnet.py

index f8b946a8839d1bd3278629df0f919f539523c4fd..ebd2a3dca3ac0e7bd812226c80c356a19b3677ab 100644 (file)
@@ -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'])