Learning is forever
Going where this year?
import urllib import xml.dom.minidom as minidom def printTweets(username): jumlah = 20 timeline_xml = urllib.urlopen("http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=%s&count=%s" % (username, jumlah)) xml = minidom.parse(timeline_xml) status = xml.getElementsByTagName("text") for twit in status: mau_dicari = twit.childNodes[0].data mau_cari = mau_dicari.find(cari) if mau_cari != -1 : print "tweet:",twit.childNodes[0].data,"\n" else : pass user = raw_input("masukkan nama user\n") cari = raw_input("masukkan yang tweet ingin dicari\n") printTweets(user) |
Good for stalking, without additional libraries, just install python, and run it. Find on 200 latest twit (the current API limit). Big thank to Mas Bima dan Mas Glowing Mind.
nb. untuk sementara hanya berjalan pada Python 2.xx
You can be the first to comment!