]>
jfr.im git - yt-dlp.git/blob - youtube_dl/extractor/odatv.py
3 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\?id=(?P<id>[^&]*)'
15 'url': 'http://odatv.com/vid_video.php?id=8E388',
16 'md5': 'dc61d052f205c9bf2da3545691485154',
20 'title': 'md5:69654805a16a16cf9ec9d055e079831c'
23 'url': 'http://odatv.com/mob_video.php?id=8E388',
24 'md5': 'dc61d052f205c9bf2da3545691485154',
28 'title': 'md5:69654805a16a16cf9ec9d055e079831c'
31 'url': 'http://odatv.com/mob_video.php?id=8E900',
36 'title': 'not found check'
40 def _real_extract(self
, url
):
41 video_id
= self
._match
_id
(url
)
42 webpage
= self
._download
_webpage
(url
, video_id
)
43 if 'NO VIDEO!' in webpage
:
44 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
),
50 'url': self
._html
_search
_regex
(r
"(http.+?video_%s\.mp4)" % re
.escape(video_id
), webpage
, 'url', flags
=re
.IGNORECASE
)