]>
Commit | Line | Data |
---|---|---|
c02ec7d4 | 1 | # coding: utf-8 |
2 | from __future__ import unicode_literals | |
3 | ||
4 | from .common import InfoExtractor | |
5 | from ..utils import smuggle_url | |
6 | ||
7 | ||
8 | class CNBCIE(InfoExtractor): | |
9 | _VALID_URL = r'https?://video\.cnbc\.com/gallery/\?video=(?P<id>[0-9]+)' | |
10 | _TEST = { | |
11 | 'url': 'http://video.cnbc.com/gallery/?video=3000503714', | |
c02ec7d4 | 12 | 'info_dict': { |
13 | 'id': '3000503714', | |
14 | 'ext': 'mp4', | |
ce548296 | 15 | 'title': 'Fighting zombies is big business', |
16 | 'description': 'md5:0c100d8e1a7947bd2feec9a5550e519e', | |
79ba9140 | 17 | 'timestamp': 1459332000, |
18 | 'upload_date': '20160330', | |
19 | 'uploader': 'NBCU-CNBC', | |
ce548296 | 20 | }, |
21 | 'params': { | |
22 | # m3u8 download | |
23 | 'skip_download': True, | |
24 | }, | |
c02ec7d4 | 25 | } |
26 | ||
27 | def _real_extract(self, url): | |
28 | video_id = self._match_id(url) | |
29 | return { | |
30 | '_type': 'url_transparent', | |
31 | 'ie_key': 'ThePlatform', | |
32 | 'url': smuggle_url( | |
33 | 'http://link.theplatform.com/s/gZWlPC/media/guid/2408950221/%s?mbr=true&manifest=m3u' % video_id, | |
34 | {'force_smil_url': True}), | |
35 | 'id': video_id, | |
36 | } |