1 from .common
import InfoExtractor
4 class TruNewsIE(InfoExtractor
):
5 _VALID_URL
= r
'https?://(?:www\.)?trunews\.com/stream/(?P<id>[^/?#&]+)'
7 'url': 'https://www.trunews.com/stream/will-democrats-stage-a-circus-during-president-trump-s-state-of-the-union-speech',
9 'id': '5c5a21e65d3c196e1c0020cc',
10 'display_id': 'will-democrats-stage-a-circus-during-president-trump-s-state-of-the-union-speech',
12 'title': "Will Democrats Stage a Circus During President Trump's State of the Union Speech?",
13 'description': 'md5:c583b72147cc92cf21f56a31aff7a670',
15 'timestamp': 1549411440,
16 'upload_date': '20190206',
20 _ZYPE_TEMPL
= 'https://player.zype.com/embed/%s.js?api_key=X5XnahkjCwJrT_l5zUqypnaLEObotyvtUKJWWlONxDoHVjP8vqxlArLV8llxMbyt'
22 def _real_extract(self
, url
):
23 display_id
= self
._match
_id
(url
)
25 zype_id
= self
._download
_json
(
26 'https://api.zype.com/videos', display_id
, query
={
27 'app_key': 'PUVKp9WgGUb3-JUw6EqafLx8tFVP6VKZTWbUOR-HOm__g4fNDt1bCsm_LgYf_k9H',
30 'friendly_title': display_id
,
31 })['response'][0]['_id']
32 return self
.url_result(self
._ZYPE
_TEMPL
% zype_id
, 'Zype', zype_id
)