2012-12-26 89 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()調用該函數,看看它給你...確保你知道什麼功能:)