[rh:websockets] Support websockets 14.0+ (#11616)
[yt-dlp3.git] / yt_dlp / extractor / fox9.py
blobdfbafa7ddfb86b8e5238f27b609ebc103abb74c7
1 from .common import InfoExtractor
4 class FOX9IE(InfoExtractor):
5 _VALID_URL = r'https?://(?:www\.)?fox9\.com/video/(?P<id>\d+)'
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)
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',
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'],
33 def _real_extract(self, url):
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')