Python 使用pylast程序时,Last.FM不能返回超过500条记录

Python 使用pylast程序时,Last.FM不能返回超过500条记录,python,last.fm,Python,Last.fm,我使用pylast从Last.fm API获取信息 当我使用下面的代码时: #!/usr/bin/env python import pylast API_KEY = "############################" API_SECRET = "##############################" ###### In order to perform a write operation you need to authenticate yourself usernam

我使用pylast从Last.fm API获取信息

当我使用下面的代码时:

#!/usr/bin/env python

import pylast

API_KEY = "############################"
API_SECRET = "##############################"

###### In order to perform a write operation you need to authenticate yourself
username = "########"
password_hash = pylast.md5("###########")
network = pylast.LastFMNetwork(api_key = API_KEY, api_secret = API_SECRET, username =         username, password_hash = password_hash)

##          _________INIT__________
COUNTRY = "United Kingdom"

#---------------------- Get Geo Country --------------------
geo_country = network.get_country(COUNTRY)
print "The country we are digging is", geo_country

#----------------------  Get artist --------------------
top_artists_of_country = geo_country.get_top_artists(limit = 1000)
top_artists_of_country_file = open('test_artist_number.txt', 'w+')
print >> top_artists_of_country_file, top_artists_of_country
top_artists_of_country_file.close()
例如,我发现我打电话时找不到1000条记录

 geo_country.get_top_artists(limit = 1000)
我只是想知道,这个限制是由Last.fm的API设置引起的还是由pylast引起的


任何帮助都会很好:

它是一个。

它是一个。

谢谢,那么如果我想使用pylast获得500多个查询,我该怎么办?@MaiTiano实际上我错了,geo.getTopArtists在API级别的限制是500个。@MaiTiano单击链接,它的限制是1000,但只返回500个条目。所以这不可能是派拉斯特的问题。我假设它没有文档记录。@MaiTiano您可以在中使用page参数以获得超过500的结果。我使用limit=500时效果不好,但使用limit=250和page=3时效果很好。@Tyrsa博士,嗯,对不起,我再次检查了它,看起来当你超过500时,你会得到最后一个结果。谢谢,如果我想使用pylast获得500多个查询,我该怎么办?@MaiTiano事实上我错了,geo.getTopArtists在API级别的限制为500。@MaiTiano单击链接,它的限制为1000,但只返回500个条目。所以这不可能是派拉斯特的问题。我假设它没有文档记录。@MaiTiano您可以在中使用page参数以获得超过500的结果。我使用limit=500时效果不好,但使用limit=250和page=3时效果很好。@Tyrsa博士,嗯,对不起,我再次检查了它,看起来当你超过500时,你会得到最后一个结果。