【问题标题】:Using Tweepy to fetch recent Tweets from a specific location使用 Tweepy 从特定位置获取最近的推文
【发布时间】:2021-02-25 08:18:34
【问题描述】:

我正在尝试从可以是城市/国家/地区的指定位置获取最近的推文。我浏览了 Tweepy 文档并按照提到的 sn-ps 进行操作,但看起来我在这里遗漏了一些东西。

# the coordinates and params
lat = 28
long = 77
granularity = 'city'
max_results = 1
  
# fetching the locations 
locations = tweepy.api.reverse_geocode(lat=lat, long=long, granularity=granularity, max_results=max_results) 

如果有人能指出我在这里遗漏了什么,那将会很有帮助。

【问题讨论】:

    标签: python python-3.x twitter tweepy


    【解决方案1】:

    tweepy.apitweepy.API 的未经身份验证的实例。
    您需要使用您的身份验证/凭据实例化您自己的 API 实例。

    【讨论】:

      猜你喜欢
      • 2016-05-18
      • 1970-01-01
      • 2016-10-20
      • 1970-01-01
      • 2011-12-27
      • 2016-08-09
      • 2020-03-12
      • 2015-11-08
      • 1970-01-01
      相关资源
      最近更新 更多