Example #1
0
api = Mobileclient()
username = raw_input("What's the email used: ")
pw = getpass.getpass("What's the password: "******"R28G61ADZMV")

playlists = api.get_all_playlists()
print playlists
stuff = playlists.get('user')
for x, y in stuff:
    print x
    print y

snag = raw_input("Enter the playlist id that you would like to get: ")

playlist_info = api.get_playlist_songs(snag)
xspf = []
for playlist in playlist_info:
    track = "<track><title>" + playlist.get(
        'name') + "</title><creator>" + playlist.get(
            'artist') + "</creator></track>"
    xspf.append(track)
    print "Artist: " + playlist.get('artist')
    print "Album: " + playlist.get('album')
    print "Song: " + playlist.get('name')

title = raw_input("What do you want to name the playlist: ")
filename = raw_input("What do you want to name the file: ")

file = open(filename + '.xspf', 'w')