浏览代码

[ted] Restrict info regex (closes #21631)

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

+ 1 - 1
youtube_dl/extractor/ted.py

@@ -133,7 +133,7 @@ class TEDIE(InfoExtractor):
 
 
     def _extract_info(self, webpage):
     def _extract_info(self, webpage):
         info_json = self._search_regex(
         info_json = self._search_regex(
-            r'(?s)q\(\s*"\w+.init"\s*,\s*({.+})\)\s*</script>',
+            r'(?s)q\(\s*"\w+.init"\s*,\s*({.+?})\)\s*</script>',
             webpage, 'info json')
             webpage, 'info json')
         return json.loads(info_json)
         return json.loads(info_json)