projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[xboxclips] Fix extraction
[youtube-dl]
/
youtube_dl
/
extractor
/
ted.py
diff --git
a/youtube_dl/extractor/ted.py
b/youtube_dl/extractor/ted.py
index f8a87afdaf4d27c59b4b29491569b243331b2322..944177426d5d719d152d3474f5b059410cb27955 100644
(file)
--- a/
youtube_dl/extractor/ted.py
+++ b/
youtube_dl/extractor/ted.py
@@
-5,7
+5,7
@@
import re
from .subtitles import SubtitlesInfoExtractor
from .subtitles import SubtitlesInfoExtractor
-from ..
utils
import (
+from ..
compat
import (
compat_str,
)
compat_str,
)
@@
-199,8
+199,9
@@
class TEDIE(SubtitlesInfoExtractor):
webpage = self._download_webpage(url, name)
config_json = self._html_search_regex(
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')
video_url = config['video']['url']
thumbnail = config.get('image', {}).get('url')