mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-07-18 06:06:06 -04:00
Play a sound when a tweet contains images
This commit is contained in:
@@ -66,6 +66,14 @@ def is_geocoded(tweet):
|
||||
if tweet.has_key("coordinates") and tweet["coordinates"] != None:
|
||||
return True
|
||||
|
||||
def is_media(tweet):
|
||||
if tweet["entities"].has_key("media") == False:
|
||||
return False
|
||||
for i in tweet["entities"]["media"]:
|
||||
if i.has_key("type") and i["type"] == "photo":
|
||||
return True
|
||||
return False
|
||||
|
||||
def get_all_mentioned(tweet, conf, field="screen_name"):
|
||||
""" Gets all users that has been mentioned."""
|
||||
results = []
|
||||
|
Reference in New Issue
Block a user