def main(): results = query_by_name(ARTIST_URL, query_type["simple"], "Lucero") artist_id = results["artist"][1]["id"] print "\nARTIST:" pretty_print(results["artist"][1]) artist_data = query_site(ARTIST_URL, query_type["releases"], artist_id) releases = artist_data["releases"] print "\nONE RELEASE:" pretty_print(release[0], indent=2) release_titles = [r["title"] for r in releases] print "\nALL TITLES:" for i in release_titles: print t if __name__ == '__main__': main()