浏览代码

[ted] Fix type_watch links extraction

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

+ 3 - 2
youtube_dl/extractor/ted.py

@@ -199,8 +199,9 @@ class TEDIE(SubtitlesInfoExtractor):
         webpage = self._download_webpage(url, name)
 
         config_json = self._html_search_regex(
-            r"data-config='([^']+)", webpage, 'config')
-        config = json.loads(config_json)
+            r'"pages\.jwplayer"\s*,\s*({.+?})\s*\)\s*</script>',
+            webpage, 'config')
+        config = json.loads(config_json)['config']
         video_url = config['video']['url']
         thumbnail = config.get('image', {}).get('url')