限制TwitterSearch API,python

时间:2016-02-28 18:55:58

标签: python twitter-search

如何限制Twitter搜索中的结果数量?

这是我认为可行的... tweetSearchUser是另一行代码中的用户输入。

tso = TwitterSearchOrder() # create a TwitterSearchOrder object
    tso.set_keywords(["tweetSearchUser"]) # let's define all words we would like to have a look for
    tso.setcount(30)
    tso.set_include_entities(False) # and don't give us all those entity information

正在查看此参考资料

https://twittersearch.readthedocs.org/en/latest/advanced_usage_ts.html

尝试了这个,看起来应该可行,但无法弄清楚输入日期的格式...

tso.set_until('2016-02-25')

1 个答案:

答案 0 :(得分:1)

您应该使用documentation中指定的Profile_rights count的默认值为200,因为它是Profile_profile返回的推文的最大值。