equal
deleted
inserted
replaced
47 |
47 |
48 results = None |
48 results = None |
49 page = 1 |
49 page = 1 |
50 |
50 |
51 while page <= int(1500/int(options.rpp)) and ( results is None or len(results) > 0): |
51 while page <= int(1500/int(options.rpp)) and ( results is None or len(results) > 0): |
52 results = twitter. search(q=options.query, rpp=options.rpp, page=page) |
52 results = twitter.search(q=options.query, rpp=options.rpp, page=page) |
53 for tweet in results["results"]: |
53 for tweet in results["results"]: |
54 print tweet |
54 print tweet |
55 tweet_str = anyjson.serialize(tweet) |
55 tweet_str = anyjson.serialize(tweet) |
56 #invalidate user id |
56 #invalidate user id |
57 processor = utils.TwitterProcessor(tweet, tweet_str, session, options.token_filename) |
57 processor = utils.TwitterProcessor(tweet, tweet_str, None, session, options.token_filename) |
58 processor.process() |
58 processor.process() |
59 session.flush() |
59 session.flush() |
60 session.commit() |
60 session.commit() |
61 page += 1 |
61 page += 1 |
62 #session.commit() |
62 #session.commit() |