2 from __future__ import unicode_literals
4 from .anvato import AnvatoIE
5 from ..utils import js_to_json
8 class FOX9IE(AnvatoIE):
9 _VALID_URL = r'https?://(?:www\.)?fox9\.com/(?:[^/]+/)+(?P<id>\d+)-story'
11 'url': 'http://www.fox9.com/news/215123287-story',
12 'md5': 'd6e1b2572c3bab8a849c9103615dd243',
16 'title': 'Bear climbs tree in downtown Duluth',
17 'description': 'md5:6a36bfb5073a411758a752455408ac90',
19 'timestamp': 1478123580,
20 'upload_date': '20161102',
22 'categories': ['News', 'Sports'],
23 'tags': ['news', 'video'],
26 'url': 'http://www.fox9.com/news/investigators/214070684-story',
27 'only_matching': True,
30 def _real_extract(self, url):
31 video_id = self._match_id(url)
33 webpage = self._download_webpage(url, video_id)
35 video_id = self._parse_json(
37 r'AnvatoPlaylist\s*\(\s*(\[.+?\])\s*\)\s*;',
38 webpage, 'anvato playlist'),
39 video_id, transform_source=js_to_json)[0]['video']
41 return self._get_anvato_videos(
42 'anvato_epfox_app_web_prod_b3373168e12f423f41504f207000188daf88251b',