]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/cnbc.py
2 from __future__
import unicode_literals
5 from .common
import InfoExtractor
6 from ..utils
import smuggle_url
9 class CNBCIE(InfoExtractor
):
10 _VALID_URL
= r
'https?://video\.cnbc\.com/gallery/\?video=(?P<id>[0-9]+)'
12 'url': 'http://video.cnbc.com/gallery/?video=3000503714',
16 'title': 'Fighting zombies is big business',
17 'description': 'md5:0c100d8e1a7947bd2feec9a5550e519e',
18 'timestamp': 1459332000,
19 'upload_date': '20160330',
20 'uploader': 'NBCU-CNBC',
24 'skip_download': True,
28 def _real_extract(self
, url
):
29 video_id
= self
._match
_id
(url
)
31 '_type': 'url_transparent',
32 'ie_key': 'ThePlatform',
34 'http://link.theplatform.com/s/gZWlPC/media/guid/2408950221/%s?mbr=true&manifest=m3u' % video_id
,
35 {'force_smil_url': True}
),
40 class CNBCVideoIE(InfoExtractor
):
41 _VALID_URL
= r
'https?://(?:www\.)?cnbc\.com(?P<path>/video/(?:[^/]+/)+(?P<id>[^./?#&]+)\.html)'
43 'url': 'https://www.cnbc.com/video/2018/07/19/trump-i-dont-necessarily-agree-with-raising-rates.html',
47 'title': "Trump: I don't necessarily agree with raising rates",
48 'description': 'md5:878d8f0b4ebb5bb1dda3514b91b49de3',
49 'timestamp': 1531958400,
50 'upload_date': '20180719',
51 'uploader': 'NBCU-CNBC',
54 'skip_download': True,
58 def _real_extract(self
, url
):
59 path
, display_id
= self
._match
_valid
_url
(url
).groups()
60 video_id
= self
._download
_json
(
61 'https://webql-redesign.cnbcfm.com/graphql', display_id
, query
={
67 })['data']['page']['vcpsId']
68 return self
.url_result(
69 'http://video.cnbc.com/gallery/?video=%d' % video_id
,