]>
jfr.im git - yt-dlp.git/blob - youtube_dlc/extractor/azmedien.py
2 from __future__
import unicode_literals
7 from .common
import InfoExtractor
8 from .kaltura
import KalturaIE
11 class AZMedienIE(InfoExtractor
):
12 IE_DESC
= 'AZ Medien videos'
23 [^/]+-(?P<article_id>\d+)
34 'url': 'https://www.telezueri.ch/sonntalk/bundesrats-vakanzen-eu-rahmenabkommen-133214569',
38 'title': 'Bundesrats-Vakanzen / EU-Rahmenabkommen',
39 'uploader_id': 'TVOnline',
40 'upload_date': '20180930',
41 'timestamp': 1538328802,
44 'skip_download': True,
47 'url': 'https://www.telebaern.tv/telebaern-news/montag-1-oktober-2018-ganze-sendung-133531189#video=0_7xjo9lf1',
50 _API_TEMPL
= 'https://www.%s/api/pub/gql/%s/NewsArticleTeaser/cb9f2f81ed22e9b47f4ca64ea3cc5a5d13e88d1d'
51 _PARTNER_ID
= '1719221'
53 def _real_extract(self
, url
):
54 host
, display_id
, article_id
, entry_id
= re
.match(self
._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 'kaltura:%s:%s' % (self
._PARTNER
_ID
, entry_id
),
66 ie
=KalturaIE
.ie_key(), video_id
=entry_id
)