]>
Commit | Line | Data |
---|---|---|
7455832f | 1 | from .common import InfoExtractor |
f3c705f8 S |
2 | |
3 | ||
7455832f RA |
4 | class FOX9IE(InfoExtractor): |
5 | _VALID_URL = r'https?://(?:www\.)?fox9\.com/video/(?P<id>\d+)' | |
6 | ||
7 | def _real_extract(self, url): | |
8 | video_id = self._match_id(url) | |
9 | return self.url_result( | |
10 | 'anvato:anvato_epfox_app_web_prod_b3373168e12f423f41504f207000188daf88251b:' + video_id, | |
11 | 'Anvato', video_id) | |
12 | ||
13 | ||
14 | class FOX9NewsIE(InfoExtractor): | |
15 | _VALID_URL = r'https?://(?:www\.)?fox9\.com/news/(?P<id>[^/?&#]+)' | |
16 | _TEST = { | |
17 | 'url': 'https://www.fox9.com/news/black-bear-in-tree-draws-crowd-in-downtown-duluth-minnesota', | |
f3c705f8 S |
18 | 'md5': 'd6e1b2572c3bab8a849c9103615dd243', |
19 | 'info_dict': { | |
20 | 'id': '314473', | |
21 | 'ext': 'mp4', | |
22 | 'title': 'Bear climbs tree in downtown Duluth', | |
23 | 'description': 'md5:6a36bfb5073a411758a752455408ac90', | |
24 | 'duration': 51, | |
25 | 'timestamp': 1478123580, | |
26 | 'upload_date': '20161102', | |
27 | 'uploader': 'EPFOX', | |
28 | 'categories': ['News', 'Sports'], | |
29 | 'tags': ['news', 'video'], | |
30 | }, | |
7455832f | 31 | } |
f3c705f8 S |
32 | |
33 | def _real_extract(self, url): | |
7455832f RA |
34 | display_id = self._match_id(url) |
35 | webpage = self._download_webpage(url, display_id) | |
36 | anvato_id = self._search_regex( | |
37 | r'anvatoId\s*:\s*[\'"](\d+)', webpage, 'anvato id') | |
38 | return self.url_result('https://www.fox9.com/video/' + anvato_id, 'FOX9') |