mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-28 17:41:01 +01:00
[ted] Add support for embed-ssl.ted.com embedded videos
This commit is contained in:
parent
87830900a9
commit
cd791a5ea0
@ -926,7 +926,7 @@ def _playlist_from_matches(matches, getter=None, ie=None):
|
|||||||
|
|
||||||
# Look for embedded TED player
|
# Look for embedded TED player
|
||||||
mobj = re.search(
|
mobj = re.search(
|
||||||
r'<iframe[^>]+?src=(["\'])(?P<url>http://embed\.ted\.com/.+?)\1', webpage)
|
r'<iframe[^>]+?src=(["\'])(?P<url>https?://embed(?:-ssl)?\.ted\.com/.+?)\1', webpage)
|
||||||
if mobj is not None:
|
if mobj is not None:
|
||||||
return self.url_result(mobj.group('url'), 'TED')
|
return self.url_result(mobj.group('url'), 'TED')
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
class TEDIE(SubtitlesInfoExtractor):
|
class TEDIE(SubtitlesInfoExtractor):
|
||||||
_VALID_URL = r'''(?x)
|
_VALID_URL = r'''(?x)
|
||||||
(?P<proto>https?://)
|
(?P<proto>https?://)
|
||||||
(?P<type>www|embed)(?P<urlmain>\.ted\.com/
|
(?P<type>www|embed(?:-ssl)?)(?P<urlmain>\.ted\.com/
|
||||||
(
|
(
|
||||||
(?P<type_playlist>playlists(?:/\d+)?) # We have a playlist
|
(?P<type_playlist>playlists(?:/\d+)?) # We have a playlist
|
||||||
|
|
|
|
||||||
@ -98,7 +98,7 @@ def _extract_info(self, webpage):
|
|||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
m = re.match(self._VALID_URL, url, re.VERBOSE)
|
m = re.match(self._VALID_URL, url, re.VERBOSE)
|
||||||
if m.group('type') == 'embed':
|
if m.group('type').startswith('embed'):
|
||||||
desktop_url = m.group('proto') + 'www' + m.group('urlmain')
|
desktop_url = m.group('proto') + 'www' + m.group('urlmain')
|
||||||
return self.url_result(desktop_url, 'TED')
|
return self.url_result(desktop_url, 'TED')
|
||||||
name = m.group('name')
|
name = m.group('name')
|
||||||
|
Loading…
Reference in New Issue
Block a user