1 from .common
import InfoExtractor
2 from ..utils
import int_or_none
, join_nonempty
5 class TOnlineIE(InfoExtractor
):
7 _ENABLED
= None # XXX: pass through to GenericIE
8 IE_NAME
= 't-online.de'
9 _VALID_URL
= r
'https?://(?:www\.)?t-online\.de/tv/(?:[^/]+/)*id_(?P<id>\d+)'
11 'url': 'http://www.t-online.de/tv/sport/fussball/id_79166266/drittes-remis-zidane-es-muss-etwas-passieren-.html',
12 'md5': '7d94dbdde5f9d77c5accc73c39632c29',
16 'title': 'Drittes Remis! Zidane: "Es muss etwas passieren"',
17 'description': 'Es läuft nicht rund bei Real Madrid. Das 1:1 gegen den SD Eibar war das dritte Unentschieden in Folge in der Liga.',
21 def _real_extract(self
, url
):
22 video_id
= self
._match
_id
(url
)
23 video_data
= self
._download
_json
(
24 f
'http://www.t-online.de/tv/id_{video_id}/tid_json_video', video_id
)
25 title
= video_data
['subtitle']
28 for asset
in video_data
.get('assets', []):
29 asset_source
= asset
.get('source') or asset
.get('source2')
33 'format_id': join_nonempty('type', 'profile', from_dict
=asset
),
38 for image
in video_data
.get('images', []):
39 image_source
= image
.get('source')
49 'description': video_data
.get('description'),
50 'duration': int_or_none(video_data
.get('duration')),
51 'thumbnails': thumbnails
,