【发布时间】: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:22 和 2011-09-19 18:10:26
而我总共只有 242 条推文。
我希望非编码人员有办法找到他们的旧推文,不是这样吗?
【问题讨论】:
-
是的。链接搜索 - twitter.com/#!/search/realtime/API%20%20from%3Astuartpowers - 是使用高级搜索表单中的高级搜索表单创建的。
-
我在 twitter 高级搜索中尝试了不同的搜索查询,但我很失望!然而,这帮助我找到了你的推文! snapbird.org搜索用户@stuartpowers:搜索查询api