script/utils/merge_tweets.py
changeset 693 2ef837069108
parent 464 b9243ade95e2
child 886 1e110b03ae96
--- a/script/utils/merge_tweets.py	Mon Oct 15 16:56:57 2012 +0200
+++ b/script/utils/merge_tweets.py	Mon Oct 15 17:01:50 2012 +0200
@@ -31,9 +31,7 @@
     return parser.parse_args()
 
 if __name__ == "__main__":
-    
-    sys.stdout = codecs.getwriter(sys.stdout.encoding)(sys.stdout)
-    
+        
     options = get_option()
     
     access_token = None
@@ -91,7 +89,8 @@
                 
                 session_tgt.flush()
                 
-            show_progress(i+1, count_tw, progress_text+tweet.text, 70)
+            ptext = progress_text + tweet.text
+            show_progress(i+1, count_tw, ptext.replace("\n",""), 70)
                             
         session_tgt.commit()
         print u"%d new tweet added" % (added)