浏览代码

[extractor/generic] Add proper default to _search_json_ld call

Sergey M․ 9 年之前
父节点
当前提交
082395d0a0
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      youtube_dl/extractor/generic.py

+ 2 - 2
youtube_dl/extractor/generic.py

@@ -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,