import soundcloud
import re
import urllib
CLIENT_ID = 'f06362a90de4a12555c9798e8a9b27d3'

client = soundcloud.Client(client_id=CLIENT_ID)


user = client.get('/resolve', url='https://soundcloud.com/kevin-brey')

print(user.id)

favorite_tracks = client.get('/users/{0}/favorites'.format(user.id), limit=10)

for f in favorite_tracks:
    match = re.match('https://[^/]*/(.*)_m.png', f.waveform_url)
    
    id = match.group(1)

    sound_url = 'http://media.soundcloud.com/stream/{0}'.format(id)

    urllib.request.urlretrieve(sound_url, '{0}.mp3'.format(id))

    print(match.group(1))

    print(f.title + " " + f.waveform_url)

@@ -491,16 +491,190 @@
 at(id)%0A%0A
+    title = '%7Bartist%7D - %7Btitle%7D.mp3'.format(artist=f.user%5B'username'%5D, title=f.title)%0A%0A    print('Downloading %22%7Btitle%7D%22 from %22%7Burl%7D%22...'.format(title=title, url=sound_url))%0A%0A
     urll
@@ -744,63 +744,26 @@
 int(
-match.group(1))%0A%0A    print(f.title + %22 %22 + f.waveform_url
+'Download complete!'
 )%0A

Improve naming of file