我还是 python 新手,我试图在创建 API 对象后提取一条推文的 id 信息。所以代码是:
import tweepy
consumer_key = 'hidden'
consumer_secret = 'hidden'
access_token = 'hidden'
access_secret = 'hidden'
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_secret)
api = tweepy.API(auth, wait_on_rate_limit=True, wait_on_rate_limit_notify=True)
# to test it
exp_tweet = api.get_status(archive.tweet_id[1000], tweet_mode = 'extended')
content = exp_tweet._json
Content
输出是:
NameError: name 'archive' is not defined
[enter image description here][1]
一只萌萌小番薯
相关分类