]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/cbssports.py
   1 from __future__ 
import unicode_literals
 
   3 from .cbs 
import CBSBaseIE
 
   6 class CBSSportsIE(CBSBaseIE
): 
   7     _VALID_URL 
= r
'https?://(?:www\.)?cbssports\.com/[^/]+/(?:video|news)/(?P<id>[^/?#&]+)' 
  10         'url': 'https://www.cbssports.com/nba/video/donovan-mitchell-flashes-star-potential-in-game-2-victory-over-thunder/', 
  12             'id': '1214315075735', 
  14             'title': 'Donovan Mitchell flashes star potential in Game 2 victory over Thunder', 
  15             'description': 'md5:df6f48622612c2d6bd2e295ddef58def', 
  16             'timestamp': 1524111457, 
  17             'upload_date': '20180419', 
  18             'uploader': 'CBSI-NEW', 
  22             'skip_download': True, 
  25         'url': 'https://www.cbssports.com/nba/news/nba-playoffs-2018-watch-76ers-vs-heat-game-3-series-schedule-tv-channel-online-stream/', 
  26         'only_matching': True, 
  29     def _extract_video_info(self
, filter_query
, video_id
): 
  30         return self
._extract
_feed
_info
('dJ5BDC', 'VxxJg8Ymh8sE', filter_query
, video_id
) 
  32     def _real_extract(self
, url
): 
  33         display_id 
= self
._match
_id
(url
) 
  34         webpage 
= self
._download
_webpage
(url
, display_id
) 
  35         video_id 
= self
._search
_regex
( 
  36             [r
'(?:=|%26)pcid%3D(\d+)', r
'embedVideo(?:Container)?_(\d+)'], 
  38         return self
._extract
_video
_info
('byId=%s' % video_id
, video_id
)