[lecture2go] Make optional fields non-fatal
authorYen Chi Hsuan <yan12125@gmail.com>
Wed, 22 Jul 2015 15:25:32 +0000 (23:25 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Wed, 22 Jul 2015 15:25:32 +0000 (23:25 +0800)
youtube_dl/extractor/lecture2go.py

index a2f9d5c543bbc816d578db262aa59ef849c26fa8..40a3d23468636877cc485ac9e064ee3527a3dcb2 100644 (file)
@@ -45,7 +45,8 @@ class Lecture2GoIE(InfoExtractor):
 
         self._sort_formats(formats)
 
-        creator = self._html_search_regex(r'<div[^>]+id="description">([^<]+)</div>', webpage, 'creator')
+        creator = self._html_search_regex(
+            r'<div[^>]+id="description">([^<]+)</div>', webpage, 'creator', fatal=False)
         duration = parse_duration(self._html_search_regex(
             r'Duration:\s*</em>\s*<em[^>]*>([^<]+)</em>', webpage, 'duration', fatal=False))
         view_count = int_or_none(self._html_search_regex(