def access_info(track, artist): try: return pygn.search(clientID=clientID, userID=userID, artist=artist, track=track) except: return retry_request(track, artist) raise
def retry_request(track, artist): return pygn.search(clientID=clientID, userID=userID, artist=artist, track=track)
def search(self, artist=None, album=None, track=None): return pygn.search(clientID=self.client_id, userID=self.user_id, artist=artist, album=album, track=track)
# This script is using Gracenote API import pygn.pygn as pygn clientID = '897996368-7A5061BC9D13DC0AF3FC9ECB9E141964' userID = '43728440884220450-CDE3B31ACCC9AFA11AD32B43712D706E' result = pygn.search(clientID=clientID, userID=userID, artist='Kings Of Convenience', album='Riot On An Empty Street', track='Homesick') print(result)
import pygn.pygn as pygn client_id = '481727732-088F497C5E2FC432B7297FB9E4EBBB3A' user_id = pygn.register(client_id) data = pygn.search(client_id,user_id,'Kings Of Convenience','Riot On An Empty Street') print(data) print(data['artist_bio_url'])