[foxsports] fix extraction(closes #17543)
[youtube-dl] / youtube_dl / extractor / foxsports.py
1 from __future__ import unicode_literals
2
3 from .common import InfoExtractor
4 from ..utils import (
5     smuggle_url,
6     update_url_query,
7 )
8
9
10 class FoxSportsIE(InfoExtractor):
11     _VALID_URL = r'https?://(?:www\.)?foxsports\.com/(?:[^/]+/)*video/(?P<id>\d+)'
12
13     _TEST = {
14         'url': 'http://www.foxsports.com/tennessee/video/432609859715',
15         'md5': 'b49050e955bebe32c301972e4012ac17',
16         'info_dict': {
17             'id': 'bwduI3X_TgUB',
18             'ext': 'mp4',
19             'title': 'Courtney Lee on going up 2-0 in series vs. Blazers',
20             'description': 'Courtney Lee talks about Memphis being focused.',
21             'upload_date': '20150423',
22             'timestamp': 1429761109,
23             'uploader': 'NEWA-FNG-FOXSPORTS',
24         },
25         'add_ie': ['ThePlatform'],
26     }
27
28     def _real_extract(self, url):
29         video_id = self._match_id(url)
30
31         return self.url_result(
32             'https://feed.theplatform.com/f/BKQ29B/foxsports-all?byId=' + video_id, 'ThePlatformFeed')