- mobj = re.match(self._VALID_URL, url)
- section = mobj.group('section')
- video_id = mobj.group('id')
- all_videos = self._download_json(
- 'http://www.cbssports.com/data/video/player/getVideos/%s?as=json' % section,
- video_id)
- # The json file contains the info of all the videos in the section
- video_info = next(v for v in all_videos if v['pcid'] == video_id)
- return self.url_result('theplatform:%s' % video_info['pid'], 'ThePlatform')
+ display_id = self._match_id(url)
+ webpage = self._download_webpage(url, display_id)
+ video_id = self._search_regex(
+ [r'(?:=|%26)pcid%3D(\d+)', r'embedVideo(?:Container)?_(\d+)'],
+ webpage, 'video id')
+ return self._extract_video_info('byId=%s' % video_id, video_id)