]>
jfr.im git - yt-dlp.git/blob - youtube_dl/extractor/mojvideo.py
2 from __future__
import unicode_literals
5 from .common
import InfoExtractor
7 class MojvideoIE(InfoExtractor
):
8 _VALID_URL
= r
'https?://(?:www\.)?mojvideo\.com/video-.*/(?P<id>[a-f0-9]+)'
10 'url': 'http://www.mojvideo.com/video-v-avtu-pred-mano-rdecelaska-alfi-nipic/3d1ed4497707730b2906',
11 'md5': 'f7fd662cc8ce2be107b0d4f2c0483ae7',
13 'id': '3d1ed4497707730b2906',
15 'title': 'V avtu pred mano rdečelaska - Alfi Nipič',
16 'description':'Video: V avtu pred mano rdečelaska - Alfi Nipič',
22 def _real_extract(self
, url
):
23 mobj
= re
.match(self
._VALID
_URL
, url
)
24 video_id
= mobj
.group('id')
26 webpage
= self
._download
_webpage
(url
, video_id
)
27 title
= self
._html
_search
_regex
(r
'<title>(.*?)</title>', webpage
, 'title')
28 description
= self
._search
_regex
(r
'<meta name="description" content="(.*)" />', webpage
, 'video description')
29 final_url
= self
._html
_search
_regex
(r
'mp4: \'(.*)\'', webpage, 'video url
')
30 height=int(self._search_regex(r'<meta name
="video_height" content
="([0-9]*)" />',webpage,"video height"))
31 width=int(self._search_regex(r'<meta name
="video_width" content
="([0-9]*)" />',webpage,"video width"))
36 'description
': description,