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,