Commit 13f8e9bb authored by Francesco Poldi's avatar Francesco Poldi

Added skip_certs and fix location

parent 40f3fe78
...@@ -198,7 +198,6 @@ def Tweet(Tweet, config): ...@@ -198,7 +198,6 @@ def Tweet(Tweet, config):
"date": dt, "date": dt,
"timezone": Tweet.timezone, "timezone": Tweet.timezone,
"place": Tweet.place, "place": Tweet.place,
"location": Tweet.location,
"tweet": Tweet.tweet, "tweet": Tweet.tweet,
"hashtags": Tweet.hashtags, "hashtags": Tweet.hashtags,
"cashtags": Tweet.cashtags, "cashtags": Tweet.cashtags,
...@@ -221,7 +220,7 @@ def Tweet(Tweet, config): ...@@ -221,7 +220,7 @@ def Tweet(Tweet, config):
} }
} }
if Tweet.retweet: if Tweet.retweet:
j_data["_source"].udpate({"user_rt_id": Tweet.user_rt_id}) j_data["_source"].update({"user_rt_id": Tweet.user_rt_id})
if Tweet.photos: if Tweet.photos:
_photos = [] _photos = []
for photo in Tweet.photos: for photo in Tweet.photos:
...@@ -249,7 +248,7 @@ def Tweet(Tweet, config): ...@@ -249,7 +248,7 @@ def Tweet(Tweet, config):
j_data["_source"].update({"geo_tweet": getLocation(Tweet.place)}) j_data["_source"].update({"geo_tweet": getLocation(Tweet.place)})
actions.append(j_data) actions.append(j_data)
es = Elasticsearch(config.Elasticsearch) es = Elasticsearch(config.Elasticsearch, verify_certs=config.Skip_certs)
if not _index_tweet_status: if not _index_tweet_status:
_index_tweet_status = createIndex(config, es, scope="tweet") _index_tweet_status = createIndex(config, es, scope="tweet")
with nostdout(): with nostdout():
...@@ -277,7 +276,7 @@ def Follow(user, config): ...@@ -277,7 +276,7 @@ def Follow(user, config):
} }
actions.append(j_data) actions.append(j_data)
es = Elasticsearch(config.Elasticsearch) es = Elasticsearch(config.Elasticsearch, verify_certs=config.Skip_certs)
if not _index_follow_status: if not _index_follow_status:
_index_follow_status = createIndex(config, es, scope="follow") _index_follow_status = createIndex(config, es, scope="follow")
with nostdout(): with nostdout():
...@@ -319,7 +318,7 @@ def UserProfile(user, config): ...@@ -319,7 +318,7 @@ def UserProfile(user, config):
j_data["_source"].update({"geo_user": _location}) j_data["_source"].update({"geo_user": _location})
actions.append(j_data) actions.append(j_data)
es = Elasticsearch(config.Elasticsearch) es = Elasticsearch(config.Elasticsearch, verify_certs=config.Skip_certs)
if not _index_user_status: if not _index_user_status:
_index_user_status = createIndex(config, es, scope="user") _index_user_status = createIndex(config, es, scope="user")
with nostdout(): with nostdout():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment