Shows the top artists for a genre
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyen | |
import sys | |
en = pyen.Pyen() | |
if len(sys.argv) > 1: | |
genre = ' '.join(sys.argv[1:]) | |
response = en.get('genre/artists', name=genre) | |
for artist in response['artists']: | |
print artist['name'] | |
else: | |
print "usage: python top_artists_for_genre.py genre name" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment