1 from __future__ import unicode_literals
12 class FoxNewsIE(AMPIE):
13 IE_DESC = 'Fox News and Fox Business Video'
14 _VALID_URL = r'https?://(?P<host>video\.fox(?:news|business)\.com)/v/(?:video-embed\.html\?video_id=)?(?P<id>\d+)'
17 'url': 'http://video.foxnews.com/v/3937480/frozen-in-time/#sp=show-clips',
18 'md5': '32aaded6ba3ef0d1c04e238d01031e5e',
22 'title': 'Frozen in Time',
23 'description': '16-year-old girl is size of toddler',
25 #'timestamp': 1304411491,
26 #'upload_date': '20110503',
27 'thumbnail': 're:^https?://.*\.jpg$',
31 'url': 'http://video.foxnews.com/v/3922535568001/rep-luis-gutierrez-on-if-obamas-immigration-plan-is-legal/#sp=show-clips',
32 'md5': '5846c64a1ea05ec78175421b8323e2df',
34 'id': '3922535568001',
36 'title': "Rep. Luis Gutierrez on if Obama's immigration plan is legal",
37 'description': "Congressman discusses president's plan",
39 #'timestamp': 1417662047,
40 #'upload_date': '20141204',
41 'thumbnail': 're:^https?://.*\.jpg$',
45 'url': 'http://video.foxnews.com/v/video-embed.html?video_id=3937480&d=video.foxnews.com',
46 'only_matching': True,
49 'url': 'http://video.foxbusiness.com/v/4442309889001',
50 'only_matching': True,
54 def _real_extract(self, url):
55 mobj = re.match(self._VALID_URL, url)
56 video_id = mobj.group('id')
57 host = mobj.group('host')
59 info = self._extract_feed_info('http://%s/v/feed/video/%s.js?template=fox' % (host, video_id))