【问题标题】:How access the replies, retweets and likes of a particular tweet using tweepy?如何使用 tweepy 访问特定推文的回复、转发和点赞?
【发布时间】:2016-11-27 08:50:20
【问题描述】:

我正在运行下面的代码。问题是找到1。所有回复 2. 转推数 3. 特定推文 ID 的点赞数。我读了this 但无法理解。作为新手,请简单的告诉我。 任何帮助都将不胜感激。

import tweepy
from tweepy import OAuthHandler
import json

consumer_key = '*********************'
consumer_secret = '*********************'
access_token = '*********************'
access_secret = '*********************'

auth = OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_secret)

api = tweepy.API(auth)

tweet = api.get_status("756856874763423744")
print(tweet)

【问题讨论】:

    标签: python-3.x twitter tweepy tweets twitter-streaming-api


    【解决方案1】:

    使用 tweet._json['retweet_count'] 这将使您获得转发计数。

    【讨论】:

      猜你喜欢
      • 2016-11-28
      • 2016-10-20
      • 2018-01-27
      • 1970-01-01
      • 1970-01-01
      • 2019-02-17
      • 2021-01-03
      • 2021-10-03
      • 1970-01-01
      相关资源
      最近更新 更多