2 from __future__ import unicode_literals
4 from .common import InfoExtractor
12 class OdaTVIE(InfoExtractor):
13 _VALID_URL = r'https?://(?:www\.)?odatv\.com/(?:mob|vid)_video\.php\?.*\bid=(?P<id>[^&]+)'
15 'url': 'http://odatv.com/vid_video.php?id=8E388',
16 'md5': 'dc61d052f205c9bf2da3545691485154',
20 'title': 'Artık Davutoğlu ile devam edemeyiz'
24 'url': 'http://odatv.com/mob_video.php?id=8E388',
25 'only_matching': True,
28 'url': 'http://odatv.com/mob_video.php?id=8E900',
29 'only_matching': True,
32 def _real_extract(self, url):
33 video_id = self._match_id(url)
34 webpage = self._download_webpage(url, video_id)
36 no_video = 'NO VIDEO!' in webpage
38 video_url = self._search_regex(
39 r'mp4\s*:\s*(["\'])(?P<url>http.+?)\1', webpage, 'video url',
40 default=None if no_video else NO_DEFAULT, group='url')
43 raise ExtractorError('Video %s does not exist' % video_id, expected=True)
48 'title': remove_start(self._og_search_title(webpage), 'Video: '),
49 'thumbnail': self._og_search_thumbnail(webpage),