![](/img/trans.png)
[英]basic twitter search using python Tweepy library, doesn't work
[英]Using tweepy library with Python in identi.ca
我正在使用tweepy庫在Python中為桌面創建一個小型新聞應用程序。 正如我在主頁上所看到的: http ://github.com/joshthecoder/tweepy,它支持identi.ca,但我無法正確登錄。 要進行身份驗證,請執行以下操作:
auth = tweepy.BasicAuthHandler(username, password)
api = tweepy.API(host = 'identi.ca/api')
要檢查我是否正確登錄:
if api.verify_credentials() is False:
print 'Unable to log in, check credentials and server status\n'
return 1
else:
print 'Correctly logged in!\n'
return 0
這總是返回1 :(
請幫忙嗎? 謝謝! :D
PD:當然,用戶名和密碼是正確的憑據:)
如tweepy文檔所暗示的那樣,僅使用identi.ca
作為主機並將api_root
設置為/api
將是訪問identi.ca API的正確方法。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.