]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[nbc] add new extractor for csnne.com(#5432)
authorremitamine <remitamine@gmail.com>
Wed, 30 Mar 2016 23:26:42 +0000 (00:26 +0100)
committerremitamine <remitamine@gmail.com>
Wed, 30 Mar 2016 23:26:42 +0000 (00:26 +0100)
youtube_dl/extractor/__init__.py
youtube_dl/extractor/nbc.py

index bd1f7d293fcfa5cbe34162e4f23e06d81cec6c6a..7b0f2b21aa951ff4209826e2277abb49221af4d0 100644 (file)
@@ -442,6 +442,7 @@ from .nationalgeographic import NationalGeographicIE
 from .naver import NaverIE
 from .nba import NBAIE
 from .nbc import (
+    CSNNEIE,
     NBCIE,
     NBCNewsIE,
     NBCSportsIE,
index a622f2212d8af38519b2906f6b27d5c0ad0dac57..43d75d3cadf7d134fd4688294824ea0b6b6b35a3 100644 (file)
@@ -134,6 +134,30 @@ class NBCSportsIE(InfoExtractor):
             NBCSportsVPlayerIE._extract_url(webpage), 'NBCSportsVPlayer')
 
 
+class CSNNEIE(InfoExtractor):
+    _VALID_URL = r'https?://www\.csnne\.com/video/(?P<id>[0-9a-z-]+)'
+
+    _TEST = {
+        'url': 'http://www.csnne.com/video/snc-evening-update-wright-named-red-sox-no-5-starter',
+        'info_dict': {
+            'id': 'yvBLLUgQ8WU0',
+            'ext': 'mp4',
+            'title': 'SNC evening update: Wright named Red Sox\' No. 5 starter.',
+            'description': 'md5:1753cfee40d9352b19b4c9b3e589b9e3',
+        }
+    }
+
+    def _real_extract(self, url):
+        display_id = self._match_id(url)
+        webpage = self._download_webpage(url, display_id)
+        return {
+            '_type': 'url_transparent',
+            'ie_key': 'ThePlatform',
+            'url': self._html_search_meta('twitter:player:stream', webpage),
+            'display_id': display_id,
+        }
+
+
 class NBCNewsIE(ThePlatformIE):
     _VALID_URL = r'''(?x)https?://(?:www\.)?nbcnews\.com/
         (?:video/.+?/(?P<id>\d+)|