【问题标题】:Twitter - Does the search just suck or am I doing something wrong?Twitter - 搜索很糟糕还是我做错了什么?
【发布时间】:2012-06-24 06:46:26
【问题描述】:

如何搜索我的一条我知道在推文文本中包含字符串:“API”的旧推文?

我试图找到的推文是:

https://twitter.com/stuartpowers/status/101507975751012352 https://twitter.com/stuartpowers/status/115850250106834944

各种搜索,如http://twitter.com/#!/search/realtime/API%20%20from%3Astuartpowers

谢天谢地,这对 python 及其 API 来说非常简单:

stu@sente:~$ python
>>> from followers import *  #followers is a wrapper script I wrote on top of Tweepy
>>> api = authorize()
>>> pprint.pprint([(x.id_str,x.text) for x in list(tweepy.Cursor(api.user_timeline,'stuartpowers').items()) if 'API' in x.text])

[('115850250106834944',
  "I wish Google's gdata API was magically ported to using @kennethreitz 's #requests library."),
 ('101507975751012352',
  'http://t.co/FpCEVa7 looks damn nifty for anyone dealing with APIs: example:     http://t.co/G0Ror3z')]

原来有两条包含“API”的推文,它们不是很老,2011-08-11 04:19:222011-09-19 18:10:26

而我总共只有 242 条推文。

我希望非编码人员有办法找到他们的旧推文,不是这样吗?

【问题讨论】:

标签: api search twitter


【解决方案1】:

搜索 API 和 REST API 是两个独立的系统。搜索的历史和推文数量有限。 REST 有更好的记录限制:您不能从一个用户那里获得超过 3200 条推文。

这两个 API 都不能信任历史数据 - 如果您要使用它,则需要定期收集它。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-05-23
    • 1970-01-01
    • 1970-01-01
    • 2014-09-07
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多