You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.1 KiB

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