cnbc.py 868 B

1234567891011121314151617181920212223242526272829
  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. 'md5': '',
  10. 'info_dict': {
  11. 'id': '3000503714',
  12. 'ext': 'mp4',
  13. 'title': 'Video title goes here',
  14. }
  15. }
  16. def _real_extract(self, url):
  17. video_id = self._match_id(url)
  18. return {
  19. '_type': 'url_transparent',
  20. 'ie_key': 'ThePlatform',
  21. 'url': smuggle_url(
  22. 'http://link.theplatform.com/s/gZWlPC/media/guid/2408950221/%s?mbr=true&manifest=m3u' % video_id,
  23. {'force_smil_url': True}),
  24. 'id': video_id,
  25. }