mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-16 01:25:06 +00:00
[nbc] add new extractor for csnne.com(#5432)
This commit is contained in:
parent
ce548296fe
commit
9cf01f7f30
2 changed files with 25 additions and 0 deletions
|
@ -442,6 +442,7 @@
|
||||||
from .naver import NaverIE
|
from .naver import NaverIE
|
||||||
from .nba import NBAIE
|
from .nba import NBAIE
|
||||||
from .nbc import (
|
from .nbc import (
|
||||||
|
CSNNEIE,
|
||||||
NBCIE,
|
NBCIE,
|
||||||
NBCNewsIE,
|
NBCNewsIE,
|
||||||
NBCSportsIE,
|
NBCSportsIE,
|
||||||
|
|
|
@ -134,6 +134,30 @@ def _real_extract(self, url):
|
||||||
NBCSportsVPlayerIE._extract_url(webpage), 'NBCSportsVPlayer')
|
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):
|
class NBCNewsIE(ThePlatformIE):
|
||||||
_VALID_URL = r'''(?x)https?://(?:www\.)?nbcnews\.com/
|
_VALID_URL = r'''(?x)https?://(?:www\.)?nbcnews\.com/
|
||||||
(?:video/.+?/(?P<id>\d+)|
|
(?:video/.+?/(?P<id>\d+)|
|
||||||
|
|
Loading…
Reference in a new issue