Commit c370e77d authored by Francesco Poldi's avatar Francesco Poldi

Evaluate tweets only if it makes sense #321

parent 41fd78fe
......@@ -83,28 +83,30 @@ def _output(obj, output, config, **extra):
async def checkData(tweet, location, config, conn):
usernames = []
user_ids = set()
global _duplicate_dict
copyright = tweet.find("div", "StreamItemContent--withheld")
if copyright is None and is_tweet(tweet):
tweet = Tweet(tweet, location, config)
if datecheck(tweet.datestamp, config):
output = format.Tweet(config, tweet)
if not tweet.datestamp:
print("[x] Hidden tweet found, account suspended due to violation of TOS")
return
if datecheck(tweet.datestamp, config):
output = format.Tweet(config, tweet)
if config.Database:
db.tweets(conn, tweet, config)
if config.Database:
db.tweets(conn, tweet, config)
if config.Pandas:
panda.update(tweet, config)
if config.Pandas:
panda.update(tweet, config)
if config.Store_object:
tweets_object.append(tweet)
if config.Store_object:
tweets_object.append(tweet)
if config.Elasticsearch:
elasticsearch.Tweet(tweet, config)
if config.Elasticsearch:
elasticsearch.Tweet(tweet, config)
_output(tweet, output, config)
_output(tweet, output, config)
async def Tweets(tweets, location, config, conn, url=''):
if (config.Profile_full or config.Location) and config.Get_replies:
......
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