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