script/rest/search_twitter.py
changeset 242 cdd7d3c0549c
parent 122 4c3a15877f80
child 255 500cd0405c7a
--- a/script/rest/search_twitter.py	Tue Jul 26 23:57:09 2011 +0200
+++ b/script/rest/search_twitter.py	Wed Jul 27 00:04:55 2011 +0200
@@ -49,12 +49,12 @@
         page = 1
         
         while page <= int(1500/int(options.rpp)) and  ( results is None  or len(results) > 0):
-            results = twitter. search(q=options.query, rpp=options.rpp, page=page)
+            results = twitter.search(q=options.query, rpp=options.rpp, page=page)
             for tweet in results["results"]:
                 print tweet
                 tweet_str = anyjson.serialize(tweet)
                 #invalidate user id
-                processor = utils.TwitterProcessor(tweet, tweet_str, session, options.token_filename)
+                processor = utils.TwitterProcessor(tweet, tweet_str, None, session, options.token_filename)
                 processor.process()
                 session.flush()
                 session.commit()