+ 'entries': entries,
+ }
+
+
+class SoundcloudPlaylistIE(SoundcloudIE):
+ _VALID_URL = r'https?://api\.soundcloud\.com/playlists/(?P<id>[0-9]+)'
+ IE_NAME = 'soundcloud:playlist'
+
+ # it's in tests/test_playlists.py
+ _TESTS = []
+
+ def _real_extract(self, url):
+ mobj = re.match(self._VALID_URL, url)
+ playlist_id = mobj.group('id')
+ base_url = '%s//api.soundcloud.com/playlists/%s.json?' % (self.http_scheme(), playlist_id)
+
+ data = compat_urllib_parse.urlencode({
+ 'client_id': self._CLIENT_ID,
+ })
+ data = self._download_json(
+ base_url + data, playlist_id, 'Downloading playlist')
+
+ entries = [
+ self._extract_info_dict(t, quiet=True) for t in data['tracks']]
+
+ return {
+ '_type': 'playlist',
+ 'id': playlist_id,
+ 'title': data.get('title'),
+ 'description': data.get('description'),
+ 'entries': entries,