1 # -*- coding: utf-8 -*-
3 from __future__ import unicode_literals
7 from .common import InfoExtractor
10 class HelsinkiIE(InfoExtractor):
11 IE_DESC = 'helsinki.fi'
12 _VALID_URL = r'https?://video\.helsinki\.fi/Arkisto/flash\.php\?id=(?P<id>\d+)'
14 'url': 'http://video.helsinki.fi/Arkisto/flash.php?id=20258',
18 'title': 'Tietotekniikkafoorumi-iltapäivä',
19 'description': 'md5:f5c904224d43c133225130fe156a5ee0',
22 'skip_download': True, # RTMP
26 def _real_extract(self, url):
27 mobj = re.match(self._VALID_URL, url)
28 video_id = mobj.group('id')
29 webpage = self._download_webpage(url, video_id)
32 mobj = re.search(r'file=((\w+):[^&]+)', webpage)
36 'play_path': mobj.group(1),
37 'url': 'rtmp://flashvideo.it.helsinki.fi/vod/',
38 'player_url': 'http://video.helsinki.fi/player.swf',
43 mobj = re.search(r'hd\.file=((\w+):[^&]+)', webpage)
47 'play_path': mobj.group(1),
48 'url': 'rtmp://flashvideo.it.helsinki.fi/vod/',
49 'player_url': 'http://video.helsinki.fi/player.swf',
54 self._sort_formats(formats)
58 'title': self._og_search_title(webpage).replace('Video: ', ''),
59 'description': self._og_search_description(webpage),
60 'thumbnail': self._og_search_thumbnail(webpage),