[urort] Modernize

This commit is contained in:
Philipp Hagemeister 2014-12-12 20:37:28 +01:00
parent 3c864e930d
commit 6a1b20de2a
1 changed files with 1 additions and 3 deletions

View File

@ -33,13 +33,11 @@ class UrortIE(InfoExtractor):
} }
def _real_extract(self, url): def _real_extract(self, url):
mobj = re.match(self._VALID_URL, url) playlist_id = self._match_id(url)
playlist_id = mobj.group('id')
fstr = compat_urllib_parse.quote("InternalBandUrl eq '%s'" % playlist_id) fstr = compat_urllib_parse.quote("InternalBandUrl eq '%s'" % playlist_id)
json_url = 'http://urort.p3.no/breeze/urort/TrackDtos?$filter=' + fstr json_url = 'http://urort.p3.no/breeze/urort/TrackDtos?$filter=' + fstr
songs = self._download_json(json_url, playlist_id) songs = self._download_json(json_url, playlist_id)
print(songs[0])
entries = [{ entries = [{
'id': '%d-%s' % (s['BandId'], s['$id']), 'id': '%d-%s' % (s['BandId'], s['$id']),