Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用 tweepy 进行简单请求,以获取有关特定用户屏幕名称的信息。我这样做了:
import tweepy api = tweepy.API api.get_user('name')
我得到错误:
unbound method _call() must be called with API instance as first argument (got str instance instead)
您需要创建 API 的一个实例:
api = tweepy.API() api.get_user('name')
演示总是更有启发性:
>>> import tweepy >>> api = tweepy.API() >>> api.get_user('zopatista') <tweepy.models.User object at 0x10ffcd910>