3 from .common
import InfoExtractor
10 class WallaIE(InfoExtractor
):
11 _VALID_URL
= r
'https?://vod\.walla\.co\.il/[^/]+/(?P<id>\d+)/(?P<display_id>.+)'
13 'url': 'http://vod.walla.co.il/movie/2642630/one-direction-all-for-one',
16 'display_id': 'one-direction-all-for-one',
18 'title': 'וואן דיירקשן: ההיסטריה',
19 'description': 'md5:de9e2512a92442574cdb0913c49bc4d8',
20 'thumbnail': r
're:^https?://.*\.jpg',
25 'skip_download': True,
33 def _real_extract(self
, url
):
34 mobj
= self
._match
_valid
_url
(url
)
35 video_id
= mobj
.group('id')
36 display_id
= mobj
.group('display_id')
38 video
= self
._download
_xml
(
39 f
'http://video2.walla.co.il/?w=null/null/{video_id}/@@/video/flv_pl',
42 item
= video
.find('./items/item')
44 title
= xpath_text(item
, './title', 'title')
45 description
= xpath_text(item
, './synopsis', 'description')
46 thumbnail
= xpath_text(item
, './preview_pic', 'thumbnail')
47 duration
= int_or_none(xpath_text(item
, './duration', 'duration'))
50 for subtitle
in item
.findall('./subtitles/subtitle'):
51 lang
= xpath_text(subtitle
, './title')
52 subtitles
[self
._SUBTITLE
_LANGS
.get(lang
, lang
)] = [{
54 'url': xpath_text(subtitle
, './src'),
58 for quality
in item
.findall('./qualities/quality'):
59 format_id
= xpath_text(quality
, './title')
61 'url': 'rtmp://wafla.walla.co.il/vod',
62 'play_path': xpath_text(quality
, './src'),
63 'player_url': 'http://isc.walla.co.il/w9/swf/video_swf/vod/WallaMediaPlayerAvod.swf',
66 'format_id': xpath_text(quality
, './title'),
68 m
= re
.search(r
'^(?P<height>\d+)[Pp]', format_id
)
70 fmt
['height'] = int(m
.group('height'))
75 'display_id': display_id
,
77 'description': description
,
78 'thumbnail': thumbnail
,
81 'subtitles': subtitles
,