mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-07-18 06:06:06 -04:00
Changed how replies works in TWBlue
This commit is contained in:
@@ -66,14 +66,14 @@ def is_geocoded(tweet):
|
||||
if tweet.has_key("coordinates") and tweet["coordinates"] != None:
|
||||
return True
|
||||
|
||||
def get_all_mentioned(tweet, conf):
|
||||
def get_all_mentioned(tweet, conf, field="screen_name"):
|
||||
""" Gets all users that has been mentioned."""
|
||||
string = []
|
||||
results = []
|
||||
for i in tweet["entities"]["user_mentions"]:
|
||||
if i["screen_name"] != conf["user_name"] and i["screen_name"] != tweet["user"]["screen_name"]:
|
||||
if i["id"] not in string:
|
||||
string.append(i["id_str"])
|
||||
return " ".join(string)+" "
|
||||
if i[field] not in results:
|
||||
results.append(i[field])
|
||||
return results
|
||||
|
||||
def get_all_users(tweet, conf):
|
||||
string = []
|
||||
|
Reference in New Issue
Block a user