Commit d76e5bc4 authored by Francesco Poldi's avatar Francesco Poldi

Fixed indexing tweets

parent 8496ba2c
...@@ -395,6 +395,24 @@ async def outTweet(tweet): ...@@ -395,6 +395,24 @@ async def outTweet(tweet):
nReplies = 0 nReplies = 0
nRetweets = 0 nRetweets = 0
jObject = {
"tweetid": tweetid,
"datestamp": date + " " + time,
"timezone": timezone,
"text": text,
"hashtags": hashtags,
"username": username,
"day": _day,
"hour": time.split(":")[0]
}
j_data = {
"_index": "twint",
"_type": "items",
"_id": tweetid + "_raw",
"_source": jObject
}
actions.append(j_data)
for l in range(int(likes)): for l in range(int(likes)):
jObject = { jObject = {
"tweetid": tweetid, "tweetid": tweetid,
......
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