def process(artist_name):
    rdio = RdioCatalog('US')
    a = Artist(artist_name)
    p = Playlist(type="artist-radio", artist=a, buckets=[rdio.bucket_identifier(), 'tracks'])
    songs = p.get_next_songs(5)
    for s in songs:
        print "Found rdio track id: %s" % rdio.get_track_id(s)
def process(artist_name):
    rdio = RdioCatalog("US")
    a = Artist(artist_name)
    p = Playlist(type="artist-radio", artist=a, buckets=[rdio.bucket_identifier(), "tracks"])
    songs = p.get_next_songs(5)
    for s in songs:
        print "Found rdio track id: %s" % rdio.get_track_id(s)
Example #3
0
from pyechonest import config
from pyechonest.playlist import Playlist


config.ECHO_NEST_API_KEY="put your key here"

my_playlist = Playlist(**{
    "type": "artist-radio",
    "artist": ["Radiohead", "Arcade Fire", "Prince"],
    "variety": 0.7,
    "buckets": ["id:7digital-US", "tracks"]
})


for i in range(1, 10):
    my_song = my_playlist.get_next_songs()[0]
    print("%(artist_name)s - %(title)s" % my_song.__dict__)
    print(my_song.__dict__)
    print("-------")