diff --git a/src/tweets/collector.py b/src/tweets/collector.py index 977e586..963b381 100644 --- a/src/tweets/collector.py +++ b/src/tweets/collector.py @@ -117,7 +117,7 @@ def processTweet(): if len(processStack) != 0: for tweet in processStack: - removedLines = fixLines(str(tweet)) + removedLines = fixLines(tweet["tweet"]) removedSpecialChars = cleanTweet(removedLines) removedSpacing = removeSpacing(removedSpecialChars[0]) @@ -140,7 +140,7 @@ def processTweet(): pos, neu, neg, compound = callSentimentAnalyser(cleanedTweet) if compound != 0.0 or neu <= 0.8: - hourTweet = {'pos': 1, 'neu': 1, 'neg': 1, 'compound': 1, 'type': ""} + hourTweet = {'pos': pos, 'neu': neu, 'neg': neg, 'compound': compound, 'type': tweet["type"]} hourStack.append(hourTweet) processStack.clear()