From: Sergey M․ Date: Wed, 3 Dec 2014 15:17:11 +0000 (+0600) Subject: [ted] Fix type_watch links extraction X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=de9bd74bc2e06a6d5396151050fd1eeafdd54a33;p=youtube-dl [ted] Fix type_watch links extraction --- diff --git a/youtube_dl/extractor/ted.py b/youtube_dl/extractor/ted.py index f8a87afda..72160503c 100644 --- a/youtube_dl/extractor/ted.py +++ b/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*', + webpage, 'config') + config = json.loads(config_json)['config'] video_url = config['video']['url'] thumbnail = config.get('image', {}).get('url')