1 from .common
import InfoExtractor
9 class MySpassIE(InfoExtractor
):
10 _VALID_URL
= r
'https?://(?:www\.)?myspass\.de/(?:[^/]+/)*(?P<id>\d+)/?[^/]*$'
12 'url': 'http://www.myspass.de/myspass/shows/tvshows/absolute-mehrheit/Absolute-Mehrheit-vom-17022013-Die-Highlights-Teil-2--/11741/',
13 'md5': '0b49f4844a068f8b33f4b7c88405862b',
17 'description': 'md5:9f0db5044c8fe73f528a390498f7ce9b',
18 'title': '17.02.2013 - Die Highlights, Teil 2',
19 'thumbnail': r
're:.*\.jpg',
21 'episode': '17.02.2013 - Die Highlights, Teil 2',
24 'series': 'Absolute Mehrheit',
30 'url': 'https://www.myspass.de/shows/tvshows/tv-total/Novak-Puffovic-bei-bester-Laune--/44996/',
31 'md5': 'eb28b7c5e254192046e86ebaf7deac8f',
35 'description': 'md5:74c7f886e00834417f1e427ab0da6121',
36 'title': 'Novak Puffovic bei bester Laune',
37 'thumbnail': r
're:.*\.jpg',
39 'episode': 'Novak Puffovic bei bester Laune',
41 'season': 'Season 19',
48 'url': 'https://www.myspass.de/channels/tv-total-raabigramm/17033/20831/',
49 'md5': '7b293a6b9f3a7acdd29304c8d0dbb7cc',
53 'description': 'Gefühle pur: Schaut euch die ungeschnittene Version von Stefans Liebesbeweis an die Moderationsgrazie von Welt, Verona Feldbusch, an.',
54 'title': 'Raabigramm Verona Feldbusch',
55 'thumbnail': r
're:.*\.jpg',
57 'episode': 'Raabigramm Verona Feldbusch',
66 def _real_extract(self
, url
):
67 video_id
= self
._match
_id
(url
)
69 metadata
= self
._download
_xml
('http://www.myspass.de/myspass/includes/apps/video/getvideometadataxml.php?id=' + video_id
, video_id
)
71 title
= xpath_text(metadata
, 'title', fatal
=True)
72 video_url
= xpath_text(metadata
, 'url_flv', 'download url', True)
73 video_id_int
= int(video_id
)
74 for group
in self
._search
_regex
(r
'/myspass2009/\d+/(\d+)/(\d+)/(\d+)/', video_url
, 'myspass', group
=(1, 2, 3), default
=[]):
75 group_int
= int(group
)
76 if group_int
> video_id_int
:
77 video_url
= video_url
.replace(group
, str(group_int
// video_id_int
))
83 'thumbnail': xpath_text(metadata
, 'imagePreview'),
84 'description': xpath_text(metadata
, 'description'),
85 'duration': parse_duration(xpath_text(metadata
, 'duration')),
86 'series': xpath_text(metadata
, 'format'),
87 'season_number': int_or_none(xpath_text(metadata
, 'season')),
88 'season_id': xpath_text(metadata
, 'season_id'),
90 'episode_number': int_or_none(xpath_text(metadata
, 'episode')),