]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/ruhd.py
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
7 class RUHDIE(InfoExtractor
):
8 _VALID_URL
= r
'https?://(?:www\.)?ruhd\.ru/play\.php\?vid=(?P<id>\d+)'
10 'url': 'http://www.ruhd.ru/play.php?vid=207',
11 'md5': 'd1a9ec4edf8598e3fbd92bb16072ba83',
15 'title': 'КОТ бааааам',
16 'description': 'классный кот)',
17 'thumbnail': r
're:^http://.*\.jpg$',
21 def _real_extract(self
, url
):
22 video_id
= self
._match
_id
(url
)
23 webpage
= self
._download
_webpage
(url
, video_id
)
25 video_url
= self
._html
_search
_regex
(
26 r
'<param name="src" value="([^"]+)"', webpage
, 'video url')
27 title
= self
._html
_search
_regex
(
28 r
'<title>([^<]+) RUHD.ru - Видео Высокого качества №1 в России!</title>',
30 description
= self
._html
_search
_regex
(
31 r
'(?s)<div id="longdesc">(.+?)<span id="showlink">',
32 webpage
, 'description', fatal
=False)
33 thumbnail
= self
._html
_search
_regex
(
34 r
'<param name="previewImage" value="([^"]+)"',
35 webpage
, 'thumbnail', fatal
=False)
37 thumbnail
= 'http://www.ruhd.ru' + thumbnail
43 'description': description
,
44 'thumbnail': thumbnail
,