[generic] Add support for sportbox embeds
authorSergey M․ <dstftw@gmail.com>
Fri, 15 May 2015 17:09:34 +0000 (23:09 +0600)
committerSergey M․ <dstftw@gmail.com>
Fri, 15 May 2015 17:09:34 +0000 (23:09 +0600)
youtube_dl/extractor/generic.py

index 3d756e8481e0aba09d2290cfd5a4a8b21369aa7d..9230c3bb046ab7ccc518bcbf8a6003012e4c414f 100644 (file)
@@ -32,6 +32,7 @@ from .brightcove import BrightcoveIE
 from .nbc import NBCSportsVPlayerIE
 from .ooyala import OoyalaIE
 from .rutv import RUTVIE
+from .sportbox import SportBoxEmbedIE
 from .smotri import SmotriIE
 from .condenast import CondeNastIE
 from .udn import UDNEmbedIE
@@ -1229,6 +1230,11 @@ class GenericIE(InfoExtractor):
         if rutv_url:
             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
         mobj = re.search(
             r'<iframe[^>]+?src=(["\'])(?P<url>https?://embed(?:-ssl)?\.ted\.com/.+?)\1', webpage)