3 from .common
import InfoExtractor
4 from .kaltura
import KalturaIE
7 class AZMedienIE(InfoExtractor
):
8 IE_DESC
= 'AZ Medien videos'
20 [^/]+-(?P<article_id>\d+)
31 'url': 'https://tv.telezueri.ch/sonntalk/bundesrats-vakanzen-eu-rahmenabkommen-133214569',
35 'title': 'Bundesrats-Vakanzen / EU-Rahmenabkommen',
36 'uploader_id': 'TVOnline',
37 'upload_date': '20180930',
38 'timestamp': 1538328802,
40 'thumbnail': 'http://cfvod.kaltura.com/p/1719221/sp/171922100/thumbnail/entry_id/1_anruz3wy/version/100031',
44 'skip_download': True,
47 'url': 'https://www.telebaern.tv/telebaern-news/montag-1-oktober-2018-ganze-sendung-133531189#video=0_7xjo9lf1',
48 'only_matching': True,
50 _API_TEMPL
= 'https://www.%s/api/pub/gql/%s/NewsArticleTeaser/a4016f65fe62b81dc6664dd9f4910e4ab40383be'
51 _PARTNER_ID
= '1719221'
53 def _real_extract(self
, url
):
54 host
, display_id
, article_id
, entry_id
= self
._match
_valid
_url
(url
).groups()
57 entry_id
= self
._download
_json
(
58 self
._API
_TEMPL
% (host
, host
.split('.')[0]), display_id
, query
={
59 'variables': json
.dumps({
60 'contextId': 'NewsArticle:' + article_id
,
62 })['data']['context']['mainAsset']['video']['kaltura']['kalturaId']
64 return self
.url_result(
65 f
'kaltura:{self._PARTNER_ID}:{entry_id}',
66 ie
=KalturaIE
.ie_key(), video_id
=entry_id
)