[bbc] Make summary optional in legacy playlist
authorSergey M․ <dstftw@gmail.com>
Sat, 10 Oct 2015 15:35:20 +0000 (21:35 +0600)
committerSergey M․ <dstftw@gmail.com>
Sat, 10 Oct 2015 15:38:09 +0000 (21:38 +0600)
youtube_dl/extractor/bbc.py

index df61f01576c73e8c0be68dabcaae2b3a50befbc6..911ccd757b6f0fe76e84de288b64e863a3e1c8d3 100644 (file)
@@ -401,7 +401,8 @@ class BBCCoUkIE(InfoExtractor):
             if kind != 'programme' and kind != 'radioProgramme':
                 continue
             title = playlist.find('./{http://bbc.co.uk/2008/emp/playlist}title').text
-            description = playlist.find('./{http://bbc.co.uk/2008/emp/playlist}summary').text
+            description_el = playlist.find('./{http://bbc.co.uk/2008/emp/playlist}summary')
+            description = description_el.text if description_el else None
 
             def get_programme_id(item):
                 def get_from_attributes(item):