2 from __future__ import unicode_literals
6 from .common import InfoExtractor
12 class UrortIE(InfoExtractor):
13 IE_DESC = 'NRK P3 Urørt'
14 _VALID_URL = r'https?://(?:www\.)?urort\.p3\.no/#!/Band/(?P<id>[^/]+)$'
17 'url': 'https://urort.p3.no/#!/Band/Gerilja',
18 'md5': '5ed31a924be8a05e47812678a86e127b',
23 'thumbnail': 're:^https?://.+\.jpg',
25 'uploader': 'Gerilja',
26 'uploader_id': 'Gerilja',
29 'matchtitle': '^The Bomb$', # To test, we want just one video
33 def _real_extract(self, url):
34 mobj = re.match(self._VALID_URL, url)
35 playlist_id = mobj.group('id')
37 fstr = compat_urllib_parse.quote("InternalBandUrl eq '%s'" % playlist_id)
38 json_url = 'http://urort.p3.no/breeze/urort/TrackDtos?$filter=' + fstr
39 songs = self._download_json(json_url, playlist_id)
42 'id': '%d-%s' % (s['BandId'], s['$id']),
46 'uploader_id': playlist_id,
47 'uploader': s.get('BandName', playlist_id),
48 'like_count': s.get('LikeCount'),
49 'thumbnail': 'http://urort.p3.no/cloud/images/%s' % s['Image'],