]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[NBC/ThePlatform/Generic] Add a generic detector for NBCSportsVPlayer and enhance...
authorYen Chi Hsuan <yan12125@gmail.com>
Mon, 30 Mar 2015 19:36:09 +0000 (03:36 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Mon, 30 Mar 2015 19:36:09 +0000 (03:36 +0800)
youtube_dl/extractor/generic.py
youtube_dl/extractor/nbc.py
youtube_dl/extractor/theplatform.py

index 042d23a13bb358619d389c9edc0e47a90cf7c73e..9ddf36f6b1455326eab27d1bdb940e925a2af294 100644 (file)
@@ -29,6 +29,7 @@ from ..utils import (
     xpath_text,
 )
 from .brightcove import BrightcoveIE
+from .nbc import NBCSportsVPlayerIE
 from .ooyala import OoyalaIE
 from .rutv import RUTVIE
 from .smotri import SmotriIE
@@ -639,6 +640,15 @@ class GenericIE(InfoExtractor):
                 'upload_date': '20150228',
                 'title': 'pdv_maddow_netcast_m4v-02-27-2015-201624',
             }
+        },
+        # NBC Sports vplayer embeds
+        {
+            'url': 'http://bbs.clutchfans.net/showthread.php?t=244180',
+            'info_dict': {
+                'id': '_hqLjQ95yx8Z',
+                'ext': 'flv'
+            },
+            'skip': 'This content expired on 9/17/14 12:23 PM',
         }
     ]
 
@@ -1252,6 +1262,11 @@ class GenericIE(InfoExtractor):
         if mobj is not None:
             return self.url_result('5min:%s' % mobj.group('id'), 'FiveMin')
 
+        # Look for NBC Sports VPlayer embeds
+        nbc_sports_url = NBCSportsVPlayerIE._extract_url(webpage)
+        if nbc_sports_url:
+            return self.url_result(nbc_sports_url, 'NBCSportsVPlayer')
+
         def check_video(vurl):
             if YoutubeIE.suitable(vurl):
                 return True
index c8dd72ab489652c12c661cf00cb6fa32bf9870a2..be9969d12b60ecf231bd769406fea78c7beef9f2 100644 (file)
@@ -51,7 +51,7 @@ class NBCIE(InfoExtractor):
 
 
 class NBCSportsVPlayerIE(InfoExtractor):
-    _VALID_URL = r'https?://vplayer\.nbcsports\.com/(?:[^/]+/)+(?P<id>[0-9a-zA-Z]+)'
+    _VALID_URL = r'https?://vplayer\.nbcsports\.com/(?:[^/]+/)+(?P<id>[0-9a-zA-Z_]+)'
 
     _TEST = {
         'url': 'https://vplayer.nbcsports.com/p/BxmELC/nbcsports_share/select/9CsDKds0kvHI',
index feac666f78baff49f4fb312a147acad67d320bc2..0e3e627f495aa5051cb96fe05f180f9790761129 100644 (file)
@@ -92,7 +92,7 @@ class ThePlatformIE(InfoExtractor):
             error_msg = next(
                 n.attrib['abstract']
                 for n in meta.findall(_x('.//smil:ref'))
-                if n.attrib.get('title') == 'Geographic Restriction')
+                if n.attrib.get('title') == 'Geographic Restriction' or n.attrib.get('title') == 'Expired')
         except StopIteration:
             pass
         else: