1 from .common
import InfoExtractor
9 class EyedoTVIE(InfoExtractor
):
10 _VALID_URL
= r
'https?://(?:www\.)?eyedo\.tv/[^/]+/(?:#!/)?Live/Detail/(?P<id>[0-9]+)'
12 'url': 'https://www.eyedo.tv/en-US/#!/Live/Detail/16301',
13 'md5': 'ba14f17995cdfc20c36ba40e21bf73f7',
17 'title': 'Journée du conseil scientifique de l\'Afnic 2015',
18 'description': 'md5:4abe07293b2f73efc6e1c37028d58c98',
19 'uploader': 'Afnic Live',
20 'uploader_id': '8023',
23 _ROOT_URL
= 'http://live.eyedo.net:1935/'
25 def _real_extract(self
, url
):
26 video_id
= self
._match
_id
(url
)
27 video_data
= self
._download
_xml
(f
'http://eyedo.tv/api/live/GetLive/{video_id}', video_id
)
30 return self
._xpath
_ns
(path
, 'http://schemas.datacontract.org/2004/07/EyeDo.Core.Implementation.Web.ViewModels.Api')
32 title
= xpath_text(video_data
, _add_ns('Titre'), 'title', True)
33 state_live_code
= xpath_text(video_data
, _add_ns('StateLiveCode'), 'title', True)
34 if state_live_code
== 'avenir':
36 f
'{self.IE_NAME} said: We\'re sorry, but this video is not yet available.',
39 is_live
= state_live_code
== 'live'
41 # http://eyedo.tv/Content/Html5/Scripts/html5view.js
43 if xpath_text(video_data
, 'Cdn') == 'true':
44 m3u8_url
= f
'http://rrr.sz.xlcdn.com/?account=eyedo&file=A{video_id}&type=live&service=wowza&protocol=http&output=playlist.m3u8'
46 m3u8_url
= self
._ROOT
_URL
+ f
'w/{video_id}/eyedo_720p/playlist.m3u8'
48 m3u8_url
= self
._ROOT
_URL
+ f
'replay-w/{video_id}/mp4:{video_id}.mp4/playlist.m3u8'
53 'formats': self
._extract
_m
3u8_formats
(
54 m3u8_url
, video_id
, 'mp4', 'm3u8_native'),
55 'description': xpath_text(video_data
, _add_ns('Description')),
56 'duration': parse_duration(xpath_text(video_data
, _add_ns('Duration'))),
57 'uploader': xpath_text(video_data
, _add_ns('Createur')),
58 'uploader_id': xpath_text(video_data
, _add_ns('CreateurId')),
59 'chapter': xpath_text(video_data
, _add_ns('ChapitreTitre')),
60 'chapter_id': xpath_text(video_data
, _add_ns('ChapitreId')),