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>.*)(?:.*)'
15 def _real_extract(self, url):
16 tmp_video_id = self._match_id(url)
18 webpage = self._download_webpage(url, tmp_video_id)
20 config_php = self._html_search_regex(
21 r'var cnf = \'([^\']+)\'', webpage, 'config.php url')
23 configpage = self._download_webpage(config_php, tmp_video_id)
25 video_id = self._html_search_regex(
26 r'<mediaid>([^<]+)', configpage, 'video id')
27 video_url = self._html_search_regex(
28 r'<file>([^<]+)', configpage, 'video URL')
29 title = self._html_search_regex(
30 r'<title><!\[CDATA\[([^\]]+)', configpage, 'title')
31 duration = int_or_none(self._html_search_regex(
32 r'<duration>([0-9]+)', configpage, 'duration', fatal=False))