Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
example of using creating genre radio
import pyen
import sys
en = pyen.Pyen()
if len(sys.argv) < 2:
print 'Usage: python seed genre name'
genre = ' '.join(sys.argv[1:])
response = en.get('playlist/static', type='genre-radio', genre_preset='core-best', genre=genre)
for i, song in enumerate(response['songs']):
print "%d %s by %s" % ((i +1), song['title'], song['artist_name'])
Copy link

plamere commented Jan 16, 2014

%python classic rock

1 Simple Man by Lynyrd Skynyrd
2 Born To Be Wild by Steppenwolf
3 All Along The Watchtower by Jimi Hendrix
4 Kashmir by Led Zeppelin
5 Sunshine Of Your Love by Cream
6 Let's Work Together by Canned Heat
7 Gimme Shelter by The Rolling Stones
8 It's My Life by The Animals
9 30 Days In The Hole by Humble Pie
10 Midnight Rider by The Allman Brothers Band
11 The Joker by Steve Miller Band
12 Fortunate Son by Creedence Clearwater Revival
13 Black Betty by Ram Jam
14 Heart Full Of Soul by The Yardbirds
15 Light My Fire by The Doors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment