]>
Commit | Line | Data |
---|---|---|
60121eb5 | 1 | # coding: utf-8 |
2 | from __future__ import unicode_literals | |
3 | ||
4 | from .common import InfoExtractor | |
60121eb5 | 5 | |
6 | ||
7 | class GameInformerIE(InfoExtractor): | |
8 | _VALID_URL = r'https?://(?:www\.)?gameinformer\.com/(?:[^/]+/)*(?P<id>.+)\.aspx' | |
9 | _TEST = { | |
10 | 'url': 'http://www.gameinformer.com/b/features/archive/2015/09/26/replay-animal-crossing.aspx', | |
203f3d77 | 11 | 'md5': '292f26da1ab4beb4c9099f1304d2b071', |
60121eb5 | 12 | 'info_dict': { |
13 | 'id': '4515472681001', | |
203f3d77 | 14 | 'ext': 'mp4', |
60121eb5 | 15 | 'title': 'Replay - Animal Crossing', |
16 | 'description': 'md5:2e211891b215c85d061adc7a4dd2d930', | |
203f3d77 | 17 | 'timestamp': 1443457610, |
18 | 'upload_date': '20150928', | |
19 | 'uploader_id': '694940074001', | |
60121eb5 | 20 | }, |
21 | } | |
203f3d77 | 22 | BRIGHTCOVE_URL_TEMPLATE = 'http://players.brightcove.net/694940074001/default_default/index.html?videoId=%s' |
60121eb5 | 23 | |
24 | def _real_extract(self, url): | |
25 | display_id = self._match_id(url) | |
9f4ec3de S |
26 | webpage = self._download_webpage( |
27 | url, display_id, headers=self.geo_verification_headers()) | |
c8064d4f PP |
28 | brightcove_id = self._search_regex( |
29 | [r'<[^>]+\bid=["\']bc_(\d+)', r"getVideo\('[^']+video_id=(\d+)"], | |
30 | webpage, 'brightcove id') | |
31 | return self.url_result( | |
32 | self.BRIGHTCOVE_URL_TEMPLATE % brightcove_id, 'BrightcoveNew', | |
33 | brightcove_id) |