2 from __future__ import unicode_literals
6 from .common import InfoExtractor
9 class GazetaIE(InfoExtractor):
10 _VALID_URL = r'(?P<url>https?://(?:www\.)?gazeta\.ru/(?:(?P<category>[^/]*)/)?video/(?:main/)?(?P<id>[A-Za-z0-9-_]+)\.s?html)'
12 'url': 'http://www.gazeta.ru/video/main/zadaite_vopros_vladislavu_yurevichu.shtml',
13 'md5': 'd49c9bdc6e5a7888f27475dc215ee789',
17 'title': '«70–80 процентов гражданских в Донецке на грани голода»',
18 'description': 'md5:38617526050bd17b234728e7f9620a71',
19 'thumbnail': 're:^https?://.*\.jpg',
23 def _real_extract(self, url):
24 mobj = re.match(self._VALID_URL, url)
26 display_id = mobj.group('id')
27 embed_url = '%s?p=embed' % mobj.group('url')
28 embed_page = self._download_webpage(
29 embed_url, display_id, 'Downloading embed page')
31 video_id = self._search_regex(
32 r'<div[^>]*?class="eagleplayer"[^>]*?data-id="([^"]+)"', embed_page, 'video id')
34 return self.url_result(
35 'eagleplatform:gazeta.media.eagleplatform.com:%s' % video_id, 'EaglePlatform')