Search code examples
pythonlast.fm

last.fm - get top fans for artist


I'm trying to retrieve top fans for a given artist on last.fm API.

I build the call with:

last = pylast.LastFMNetwork(api_key = API_KEY, api_secret =API_SECRET, username = username, password_hash = password_hash)

art = last.get_artist(artist)

fans  = art.get_top_fans(limit=2)

but I am getting the following error:

pylast.WSError: Invalid Method - No method with that name in this package

has this method been deprecated?


Solution

  • Last.fm API methods are listed here:

    http://www.last.fm/api

    Artists do not appear to have a getTopFans method, so that is likely causing your issue.