]>
jfr.im git - yt-dlp.git/blob - youtube_dlc/extractor/trunews.py
1 from __future__
import unicode_literals
3 from .common
import InfoExtractor
6 class TruNewsIE(InfoExtractor
):
7 _VALID_URL
= r
'https?://(?:www\.)?trunews\.com/stream/(?P<id>[^/?#&]+)'
9 'url': 'https://www.trunews.com/stream/will-democrats-stage-a-circus-during-president-trump-s-state-of-the-union-speech',
11 'id': '5c5a21e65d3c196e1c0020cc',
12 'display_id': 'will-democrats-stage-a-circus-during-president-trump-s-state-of-the-union-speech',
14 'title': "Will Democrats Stage a Circus During President Trump's State of the Union Speech?",
15 'description': 'md5:c583b72147cc92cf21f56a31aff7a670',
17 'timestamp': 1549411440,
18 'upload_date': '20190206',
22 _ZYPE_TEMPL
= 'https://player.zype.com/embed/%s.js?api_key=X5XnahkjCwJrT_l5zUqypnaLEObotyvtUKJWWlONxDoHVjP8vqxlArLV8llxMbyt'
24 def _real_extract(self
, url
):
25 display_id
= self
._match
_id
(url
)
27 zype_id
= self
._download
_json
(
28 'https://api.zype.com/videos', display_id
, query
={
29 'app_key': 'PUVKp9WgGUb3-JUw6EqafLx8tFVP6VKZTWbUOR-HOm__g4fNDt1bCsm_LgYf_k9H',
32 'friendly_title': display_id
,
33 })['response'][0]['_id']
34 return self
.url_result(self
._ZYPE
_TEMPL
% zype_id
, 'Zype', zype_id
)