Months ago, when Twitter still worked normally, there is a Twitter IM, a gtalk bot. Which allows you to track tweets with keywords. Soon, the whale showed up, it ate the Twitter IM.

Few days ago, I suddenly saw the Twitter Seach API1. It is not only the tracking, but more powerful. This API provides exactly what you can search via Twitter Search. You can read this search operators explanation2.

I just have some progress on my Twitter Python client. It’s a Python library, a package. In it, there is a sample called Tracker.py. It can track as if Twitter IM did for us.

Tracker.py actually is just a sample code, but it’s enough for me. Here is a quick screenshot, which ran on Linux:

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghsfSJtyjp0fdympZBS3cIWgp5y7dJKAN-xGqezIXJJ4l1oap-sQ2jmQ6AwQawlye_q54xCy2z1Ml0Fbf2uxDuX__tVBOkmAFrxRYaFCsc94Szx5NSL3dvMgh4310LB10TshMA-qYXSAI/s1600-r/TwitterTracker.png

You can start Tracker.py as many as you like. It’s a console script and simple one.

1   What can you track?

  • linux
  • linux OR windows
  • obama OR mccain
  • linux windows (linux and windows)
  • #topic
  • from:livietter (sends from me)
  • to:livietter (sends to me)
  • @livibetter (someone mentions me or reply to me)
  • livibetter (me?)
  • twitter -livibetter (someone says twitter but not from me)
  • scoble OR monaaa (stalk some people)

I suggest that you can use Twitter Advanced Search to compose your query, then paste to Tracker.py.

2   How to get this to work?

  • Follow the installation step in Twitter Python client.
  • Download Tracker.py if not installed using source.
  • Run Tracker.py.
  • Start stalking , I meant tracking. :)

3   What did I create this for?

Someone says “anyone” in their tweets. I think if someone needs a hand, they may use “anyone” in tweet. I am seeking people who need help.

4   What does Tracker.py do?

It will get tweets once a minute.

5   Final Notes

I only tested it on Linux, but I think it should work on other systems. I know this page probably can not help people who don’t know much about Python. If you have any problems, please give related information, I will add supplementation as soon as possible.

Exact phrase, e.g. “search string”, will have trouble in Tracker.py. But I am too lazy to fix it.

This Tracker.py and Twitter Python client are just the first release (barely called a release), they may be buggy.

Any ideas, suggestions, or bug reports are welcome!

[1]original link http://apiwiki.twitter.com/Search+API+Documentation, now is dead.
[2]http://search.twitter.com/operators is dead.