2 from __future__ import unicode_literals
4 from .common import InfoExtractor
5 from ..compat import compat_urlparse
8 class FczenitIE(InfoExtractor):
9 _VALID_URL = r'https?://(?:www\.)?fc-zenit\.ru/video/(?P<id>[0-9]+)'
11 'url': 'http://fc-zenit.ru/video/41044/',
12 'md5': '0e3fab421b455e970fa1aa3891e57df0',
16 'title': 'Так пишется история: казанский разгром ЦСКА на «Зенит-ТВ»',
20 def _real_extract(self, url):
21 video_id = self._match_id(url)
22 webpage = self._download_webpage(url, video_id)
24 video_title = self._html_search_regex(
25 r'<[^>]+class=\"photoalbum__title\">([^<]+)', webpage, 'title')
27 video_items = self._parse_json(self._search_regex(
28 r'arrPath\s*=\s*JSON\.parse\(\'(.+)\'\)', webpage, 'video items'),
31 def merge_dicts(*dicts):
38 'url': compat_urlparse.urljoin(url, video_url),
40 } for tbr, video_url in merge_dicts(*video_items).items()]
42 self._sort_formats(formats)