4 from .common import InfoExtractor
9 class IGNIE(InfoExtractor):
10 _VALID_URL = r'http://www.ign.com/videos/.+/(?P<name>.+)'
14 u'url': u'http://www.ign.com/videos/2013/06/05/the-last-of-us-review',
15 u'file': u'8f862beef863986b2785559b9e1aa599.mp4',
16 u'md5': u'eac8bdc1890980122c3b66f14bdd02e9',
18 u'title': u'The Last of Us Review',
19 u'description': u'md5:c8946d4260a4d43a00d5ae8ed998870c',
23 def _real_extract(self, url):
24 mobj = re.match(self._VALID_URL, url)
25 name = mobj.group('name')
26 config_url = url + '.config'
27 webpage = self._download_webpage(url, name)
28 config = json.loads(self._download_webpage(config_url, name, u'Downloading video info'))
30 self.report_extraction(name)
31 description = self._html_search_regex(r'<span class="page-object-description">(.+?)</span>',
32 webpage, 'video description', flags=re.DOTALL)
33 media = config['playlist']['media']
34 video_url = media['url']
36 return {'id': media['metadata']['videoId'],
38 'ext': determine_ext(video_url),
39 'title': media['metadata']['title'],
40 'description': description,
41 'thumbnail': media['poster'][0]['url'].replace('{size}', 'small'),