1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-12-23 16:36:48 +00:00

[generic] Add support for sportbox embeds

This commit is contained in:
Sergey M․ 2015-05-15 23:09:34 +06:00
parent ef28a6cb26
commit d40a3b5b55

View File

@ -32,6 +32,7 @@ from .brightcove import BrightcoveIE
from .nbc import NBCSportsVPlayerIE from .nbc import NBCSportsVPlayerIE
from .ooyala import OoyalaIE from .ooyala import OoyalaIE
from .rutv import RUTVIE from .rutv import RUTVIE
from .sportbox import SportBoxEmbedIE
from .smotri import SmotriIE from .smotri import SmotriIE
from .condenast import CondeNastIE from .condenast import CondeNastIE
from .udn import UDNEmbedIE from .udn import UDNEmbedIE
@ -1229,6 +1230,11 @@ class GenericIE(InfoExtractor):
if rutv_url: if rutv_url:
return self.url_result(rutv_url, 'RUTV') return self.url_result(rutv_url, 'RUTV')
# Look for embedded SportBox player
sportbox_urls = SportBoxEmbedIE._extract_urls(webpage)
if sportbox_urls:
return _playlist_from_matches(sportbox_urls, ie='SportBoxEmbed')
# Look for embedded TED player # Look for embedded TED player
mobj = re.search( mobj = re.search(
r'<iframe[^>]+?src=(["\'])(?P<url>https?://embed(?:-ssl)?\.ted\.com/.+?)\1', webpage) r'<iframe[^>]+?src=(["\'])(?P<url>https?://embed(?:-ssl)?\.ted\.com/.+?)\1', webpage)