1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-02 17:22:31 +01:00

[ted] Fix type_watch links extraction

This commit is contained in:
Sergey M․ 2014-12-03 21:17:11 +06:00
parent 233d37fb6b
commit de9bd74bc2

View File

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