tweepy中没有属性Retweet_status

时间:2018-09-26 15:17:38

标签: python tweepy

我正在尝试检索retweeted_status,但出现错误

AttributeError: 'Status' object has no attribute 'retweet_status'

这是我的代码。以前它对我有用,所以不确定现在是否已损坏,或者语法是否已更改。

with open('C:/Users/User/Desktop/localGovCamp3.csv', 'wb') as f:
    w = csv.writer(f)                  
    for tweet in tweepy.Cursor(api.search,q="@localgovcamp", 
count=1000,result_type="recent",include_entities=True,lang="en").items():

       rt = tweet.retweet_status.id
       print rt 

1 个答案:

答案 0 :(得分:1)

我得出的结论是,使用Cursor时retweet_status不起作用,因为它可以与OAuth或Stream正常工作。