From 0b18c92e0ebce59000c595213669b34ad9680512 Mon Sep 17 00:00:00 2001
From: Terry Liao <jinliang@student.unimelb.edu.au>
Date: Tue, 14 May 2019 20:14:03 +1000
Subject: [PATCH] minor changes ton tweet harvester

---
 tweet_havester/tweepy_stream.py  | 1 -
 tweet_havester/tweet_havester.py | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/tweet_havester/tweepy_stream.py b/tweet_havester/tweepy_stream.py
index 45fe45c..7087200 100644
--- a/tweet_havester/tweepy_stream.py
+++ b/tweet_havester/tweepy_stream.py
@@ -35,7 +35,6 @@ class listener(StreamListener):
             content = json.loads(data)
             dic = self.convertValue(content)
             id_doc = {"_id":str(dic["user_id"]),"user_name":content['user']['name'],"isSearched":False}
-            print(id_doc)
             p_dic = gp.data_process(dic,self.model)
             if p_dic != None:
                 process_db.save(p_dic)
diff --git a/tweet_havester/tweet_havester.py b/tweet_havester/tweet_havester.py
index 5caf3d6..bbba55a 100644
--- a/tweet_havester/tweet_havester.py
+++ b/tweet_havester/tweet_havester.py
@@ -11,6 +11,8 @@ if __name__ == "__main__":
         username = a[2] 
         password = a[3]
         server_path = 'http://' + username +':' + password +'@'+ip+':5984/'
+    else:
+        server_path = 'http://'+a[1]
     tStream.run(server_path)
     # wait for streamming for a while to start searching
     # time.sleep(200)
-- 
GitLab