1 from .brightcove
import BrightcoveNewIE
2 from .common
import InfoExtractor
10 class GameInformerIE(InfoExtractor
):
11 _VALID_URL
= r
'https?://(?:www\.)?gameinformer\.com/(?:[^/]+/)*(?P<id>[^.?&#]+)'
13 # normal Brightcove embed code extracted with BrightcoveNewIE._extract_url
14 'url': 'http://www.gameinformer.com/b/features/archive/2015/09/26/replay-animal-crossing.aspx',
15 'md5': '292f26da1ab4beb4c9099f1304d2b071',
17 'id': '4515472681001',
19 'title': 'Replay - Animal Crossing',
20 'description': 'md5:2e211891b215c85d061adc7a4dd2d930',
21 'timestamp': 1443457610,
22 'upload_date': '20150928',
23 'uploader_id': '694940074001',
26 # Brightcove id inside unique element with field--name-field-brightcove-video-id class
27 'url': 'https://www.gameinformer.com/video-feature/new-gameplay-today/2019/07/09/new-gameplay-today-streets-of-rogue',
29 'id': '6057111913001',
31 'title': 'New Gameplay Today – Streets Of Rogue',
32 'timestamp': 1562699001,
33 'upload_date': '20190709',
34 'uploader_id': '694940074001',
38 BRIGHTCOVE_URL_TEMPLATE
= 'http://players.brightcove.net/694940074001/default_default/index.html?videoId=%s'
40 def _real_extract(self
, url
):
41 display_id
= self
._match
_id
(url
)
42 webpage
= self
._download
_webpage
(
43 url
, display_id
, headers
=self
.geo_verification_headers())
44 brightcove_id
= clean_html(get_element_by_class('field--name-field-brightcove-video-id', webpage
) or get_element_by_id('video-source-content', webpage
))
45 brightcove_url
= self
.BRIGHTCOVE_URL_TEMPLATE
% brightcove_id
if brightcove_id
else BrightcoveNewIE
._extract
_url
(self
, webpage
)
46 return self
.url_result(brightcove_url
, 'BrightcoveNew', brightcove_id
)