| 
									
										
										
										
											2015-02-19 13:06:53 +01:00
										 |  |  | from __future__ import unicode_literals | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-19 23:40:00 +01:00
										 |  |  | from .cbs import CBSBaseIE | 
					
						
							| 
									
										
										
										
											2015-02-19 13:06:53 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-19 23:40:00 +01:00
										 |  |  | class CBSSportsIE(CBSBaseIE): | 
					
						
							|  |  |  |     _VALID_URL = r'https?://www\.cbssports\.com/video/player/[^/]+/(?P<id>\d+)' | 
					
						
							| 
									
										
										
										
											2015-02-19 13:06:53 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-19 23:40:00 +01:00
										 |  |  |     _TESTS = [{ | 
					
						
							|  |  |  |         'url': 'http://www.cbssports.com/video/player/videos/708337219968/0/ben-simmons-the-next-lebron?-not-so-fast', | 
					
						
							| 
									
										
										
										
											2015-02-19 13:06:53 +01:00
										 |  |  |         'info_dict': { | 
					
						
							| 
									
										
										
										
											2016-06-19 23:40:00 +01:00
										 |  |  |             'id': '708337219968', | 
					
						
							|  |  |  |             'ext': 'mp4', | 
					
						
							|  |  |  |             'title': 'Ben Simmons the next LeBron? Not so fast', | 
					
						
							|  |  |  |             'description': 'md5:854294f627921baba1f4b9a990d87197', | 
					
						
							|  |  |  |             'timestamp': 1466293740, | 
					
						
							|  |  |  |             'upload_date': '20160618', | 
					
						
							|  |  |  |             'uploader': 'CBSI-NEW', | 
					
						
							| 
									
										
										
										
											2015-02-19 13:06:53 +01:00
										 |  |  |         }, | 
					
						
							| 
									
										
										
										
											2016-06-19 23:40:00 +01:00
										 |  |  |         'params': { | 
					
						
							|  |  |  |             # m3u8 download | 
					
						
							|  |  |  |             'skip_download': True, | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |     }] | 
					
						
							| 
									
										
										
										
											2015-02-19 13:06:53 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def _real_extract(self, url): | 
					
						
							| 
									
										
										
										
											2016-06-19 23:40:00 +01:00
										 |  |  |         video_id = self._match_id(url) | 
					
						
							|  |  |  |         return self._extract_video_info('byId=%s' % video_id, video_id) |