]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/myspass.py
2 from __future__
import unicode_literals
4 from . common
import InfoExtractor
5 from .. compat
import compat_str
13 class MySpassIE ( InfoExtractor
):
14 _VALID_URL
= r
'https?://(?:www\.)?myspass\.de/(?:[^/]+/)*(?P<id>\d+)/?[^/]*$'
16 'url' : 'http://www.myspass.de/myspass/shows/tvshows/absolute-mehrheit/Absolute-Mehrheit-vom-17022013-Die-Highlights-Teil-2--/11741/' ,
17 'md5' : '0b49f4844a068f8b33f4b7c88405862b' ,
21 'description' : 'md5:9f0db5044c8fe73f528a390498f7ce9b' ,
22 'title' : '17.02.2013 - Die Highlights, Teil 2' ,
23 'thumbnail' : r
're:.*\.jpg' ,
25 'episode' : '17.02.2013 - Die Highlights, Teil 2' ,
28 'series' : 'Absolute Mehrheit' ,
34 'url' : 'https://www.myspass.de/shows/tvshows/tv-total/Novak-Puffovic-bei-bester-Laune--/44996/' ,
35 'md5' : 'eb28b7c5e254192046e86ebaf7deac8f' ,
39 'description' : 'md5:74c7f886e00834417f1e427ab0da6121' ,
40 'title' : 'Novak Puffovic bei bester Laune' ,
41 'thumbnail' : r
're:.*\.jpg' ,
43 'episode' : 'Novak Puffovic bei bester Laune' ,
45 'season' : 'Season 19' ,
52 'url' : 'https://www.myspass.de/channels/tv-total-raabigramm/17033/20831/' ,
53 'md5' : '7b293a6b9f3a7acdd29304c8d0dbb7cc' ,
57 'description' : 'Gefühle pur: Schaut euch die ungeschnittene Version von Stefans Liebesbeweis an die Moderationsgrazie von Welt, Verona Feldbusch, an.' ,
58 'title' : 'Raabigramm Verona Feldbusch' ,
59 'thumbnail' : r
're:.*\.jpg' ,
61 'episode' : 'Raabigramm Verona Feldbusch' ,
70 def _real_extract ( self
, url
):
71 video_id
= self
._ match
_ id
( url
)
73 metadata
= self
._ download
_ xml
( 'http://www.myspass.de/myspass/includes/apps/video/getvideometadataxml.php?id=' + video_id
, video_id
)
75 title
= xpath_text ( metadata
, 'title' , fatal
= True )
76 video_url
= xpath_text ( metadata
, 'url_flv' , 'download url' , True )
77 video_id_int
= int ( video_id
)
78 for group
in self
._ search
_ regex
( r
'/myspass2009/\d+/(\d+)/(\d+)/(\d+)/' , video_url
, 'myspass' , group
=( 1 , 2 , 3 ), default
=[]):
79 group_int
= int ( group
)
80 if group_int
> video_id_int
:
81 video_url
= video_url
. replace ( group
, compat_str ( group_int
// video_id_int
))
87 'thumbnail' : xpath_text ( metadata
, 'imagePreview' ),
88 'description' : xpath_text ( metadata
, 'description' ),
89 'duration' : parse_duration ( xpath_text ( metadata
, 'duration' )),
90 'series' : xpath_text ( metadata
, 'format' ),
91 'season_number' : int_or_none ( xpath_text ( metadata
, 'season' )),
92 'season_id' : xpath_text ( metadata
, 'season_id' ),
94 'episode_number' : int_or_none ( xpath_text ( metadata
, 'episode' )),