]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[extractor/generic] Add proper default to _search_json_ld call
authorSergey M․ <dstftw@gmail.com>
Mon, 8 Aug 2016 15:48:33 +0000 (22:48 +0700)
committerSergey M․ <dstftw@gmail.com>
Mon, 8 Aug 2016 15:48:33 +0000 (22:48 +0700)
youtube_dl/extractor/generic.py

index e89a0376033e0ad9c664bab90c3a6e0b81fa5b3a..50500ce0e0f03b9ea81c400b477a6b73c7d554ed 100644 (file)
@@ -2241,8 +2241,8 @@ class GenericIE(InfoExtractor):
 
         # Looking for http://schema.org/VideoObject
         json_ld = self._search_json_ld(
-            webpage, video_id, default=None, expected_type='VideoObject')
-        if json_ld and json_ld.get('url'):
+            webpage, video_id, default={}, expected_type='VideoObject')
+        if json_ld.get('url'):
             info_dict.update({
                 'title': video_title or info_dict['title'],
                 'description': video_description,