3 from __future__ import unicode_literals
5 from .common import InfoExtractor
6 from ..utils import js_to_json
9 class HelsinkiIE(InfoExtractor):
10 IE_DESC = 'helsinki.fi'
11 _VALID_URL = r'https?://video\.helsinki\.fi/Arkisto/flash\.php\?id=(?P<id>\d+)'
13 'url': 'http://video.helsinki.fi/Arkisto/flash.php?id=20258',
17 'title': 'Tietotekniikkafoorumi-iltapäivä',
18 'description': 'md5:f5c904224d43c133225130fe156a5ee0',
21 'skip_download': True, # RTMP
25 def _real_extract(self, url):
26 video_id = self._match_id(url)
27 webpage = self._download_webpage(url, video_id)
29 params = self._parse_json(self._html_search_regex(
30 r'(?s)jwplayer\("player"\).setup\((\{.*?\})\);',
31 webpage, 'player code'), video_id, transform_source=js_to_json)
35 } for s in params['sources']]
36 self._sort_formats(formats)
40 'title': self._og_search_title(webpage).replace('Video: ', ''),
41 'description': self._og_search_description(webpage),