【问题标题】:last.fm - get top fans for artistlast.fm - 为艺术家获得顶级粉丝
【发布时间】:2016-12-03 22:58:42
【问题描述】:

我正在尝试为last.fm API 上的给定艺术家检索top fans。

我通过以下方式建立通话:

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)

但我收到以下错误:

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

此方法已被弃用吗?

【问题讨论】:

    标签: python last.fm


    【解决方案1】:

    Last.fm API 方法在此处列出:

    http://www.last.fm/api

    艺术家似乎没有 getTopFans 方法,因此这可能会导致您的问题。

    【讨论】:

    • 是的,我知道文档,但包装器 - 请参阅 https://github.com/pylast/pylast/blob/develop/tests/test_pylast.py,在 line 1252 上列出了 get_top_fans 方法。这就是为什么我问它是否已被弃用。
    • plastic 库自 2014 年以来一直没有更新,并且从那时起 last.fm API 发生了重大变化。因此,虽然库中确实定义了 get_last_fans 方法,但由于没有相应的 API 端点,因此无法使用它。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-11-14
    • 1970-01-01
    • 1970-01-01
    • 2011-09-26
    • 1970-01-01
    • 1970-01-01
    • 2021-10-04
    相关资源
    最近更新 更多