This commit is contained in:
Bill Dengler 2015-05-12 22:12:14 -04:00
parent 6f88e08811
commit 0845553047

View File

@ -46,6 +46,10 @@ def is_audio(tweet,force=False):
if force == False and 'is_audio' in tweet: if force == False and 'is_audio' in tweet:
return tweet['is_audio'] return tweet['is_audio']
try: try:
if len(find_urls(tweet)) < 1:
tweet['is_audio']=False
return False
if len(tweet["entities"]["hashtags"]) > 0: if len(tweet["entities"]["hashtags"]) > 0:
for i in tweet["entities"]["hashtags"]: for i in tweet["entities"]["hashtags"]:
if i["text"] == "audio": if i["text"] == "audio":