]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/fczenit.py
8d1010b88c83dcbfd3e71e9f20275bf6fb9c9d21
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)