如何搜索我的一条旧推文,我知道它在推文文本中包含字符串:“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 条推文。
我希望非编码人员有办法找到他们的旧推文,不是这样吗?