2012-12-26 91 views
0

我想通过Pylast获取通过Last.fm API的用户信息,但它返回错误:绑定方法,我想我需要你的帮助。我想通过Last.fm API通过Pylast获取用户信息

import pylast 

API_KEY = "xxx" 
API_SECRET = "xxx" 

username = "xxx" 
password_hash = pylast.md5("xxx") 

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

#Get User Info 
user = pylast.User('xxx',network=network) 
print user.get_id 
+1

你需要更具体。为初学者添加完整的回溯信息... –

回答

1

这是不是一个错误,它只是告诉你,user.get_id是绑定对对象的功能

我想你需要的是print user.get_id()调用该函数,看看它给你...确保你知道什么功能:)