Exemplo n.º 1
0
 def process(self, tweet):
   tweet = json.loads(tweet)
   twi   = Utl.processTweetStream(tweet)
   # what's the f**k!!!
   twi   = json.loads(twi)
   (match_dbname, match_collection) = self.findmatch(twi['text'])
   for i in range(0, len(match_dbname)):
     self.db[match_dbname[i]][match_collection[i]].insert(twi)
Exemplo n.º 2
0
 def process(self, tweets) :
   self.count = self.count + 1
   print self.count
  # for twi in tweets:
   tweet = json.loads(tweets)
   #print tweet
   twi = Utl.processTweetStream(tweet)
   print "Shittty"
   #print twi['id']
   self.db.insert(json.loads(twi))