2 from __future__ import unicode_literals
4 from .common import InfoExtractor
12 class MegavideozeuIE(InfoExtractor):
13 _VALID_URL = r'https?://(?:www\.)?megavideoz\.eu/video/(?P<id>.*)(?:.*)'
16 'url': 'http://megavideoz.eu/video/WM6UB919XMXH/SMPTE-Universal-Film-Leader',
21 'title': 'SMPTE Universal Film Leader',
27 def _real_extract(self, url):
28 tmp_video_id = self._match_id(url)
30 webpage = self._download_webpage(url, tmp_video_id)
32 config_php = self._html_search_regex(
33 r'var cnf = \'([^\']+)\'', webpage, 'config.php url')
35 configpage = self._download_webpage(config_php, tmp_video_id)
37 video_id = self._html_search_regex(
38 r'<mediaid>([^<]+)', configpage, 'video id')
39 video_url = self._html_search_regex(
40 r'<file>([^<]+)', configpage, 'video URL')
41 title = self._html_search_regex(
42 r'<title><!\[CDATA\[([^\]]+)', configpage, 'title')
43 duration = int_or_none(self._html_search_regex(
44 r'<duration>([0-9\.]+)', configpage, 'duration', fatal=False))