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.

31 lines
1.0 KiB

  1. from __future__ import unicode_literals
  2. from .cbs import CBSBaseIE
  3. class CBSSportsIE(CBSBaseIE):
  4. _VALID_URL = r'https?://(?:www\.)?cbssports\.com/video/player/[^/]+/(?P<id>\d+)'
  5. _TESTS = [{
  6. 'url': 'http://www.cbssports.com/video/player/videos/708337219968/0/ben-simmons-the-next-lebron?-not-so-fast',
  7. 'info_dict': {
  8. 'id': '708337219968',
  9. 'ext': 'mp4',
  10. 'title': 'Ben Simmons the next LeBron? Not so fast',
  11. 'description': 'md5:854294f627921baba1f4b9a990d87197',
  12. 'timestamp': 1466293740,
  13. 'upload_date': '20160618',
  14. 'uploader': 'CBSI-NEW',
  15. },
  16. 'params': {
  17. # m3u8 download
  18. 'skip_download': True,
  19. }
  20. }]
  21. def _extract_video_info(self, filter_query, video_id):
  22. return self._extract_feed_info('dJ5BDC', 'VxxJg8Ymh8sE', filter_query, video_id)
  23. def _real_extract(self, url):
  24. video_id = self._match_id(url)
  25. return self._extract_video_info('byId=%s' % video_id, video_id)