Tweepy 没有过滤因为 [英] Tweepy Not filtering on Since

查看:40
本文介绍了Tweepy 没有过滤因为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现了许多 tweepy 光标的例子,其中参数是since = "YYYY-MM-DD"".但是,在我下面的代码中,它返回的推文比我指定的日期早得多.为什么?

I have found many examples of the tweepy cursor where a parameter is "since = "YYYY-MM-DD"". However, in my code below, it is returning tweets much older than the date I specify. Why?

since = "2017-9-20"
tweepy.Cursor(api.search,
                       q="nba -filter:retweets",
                       since = since,
                       rpp=100,
                       result_type="recent",
                       include_entities=True,
                       lang="en", 
                       ).items(10)
tweet.text

它返回的一条推文的例子是:

An example of a tweet it returns is:

created_at=datetime.datetime(2011, 9, 19, 18, 12, 50)id=376333795

created_at=datetime.datetime(2011, 9, 19, 18, 12, 50) id=376333795

推荐答案

我认为您正在查看与推文的 不同的created_at.也许用户的created_at?
因为您的代码似乎是正确的.

I think you are looking at a different created_at than the tweet's. Perhaps the user's created_at?
Cuz your code seems correct.

这篇关于Tweepy 没有过滤因为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆