identifiers

This commit is contained in:
deathbybandaid 2019-06-19 08:03:24 -04:00
parent 0cdf5230e5
commit d98af55a04

View File

@ -31,10 +31,13 @@ class Sherlock():
self.dict[social_network]["cache"] = dict()
def check_network(self, username, social_network):
username = str(username)
if username in list(self.dict[social_network]["cache"].keys()):
if time.time() - self.dict[social_network]["cache"][username]["time"] <= 1800:
return self.dict[social_network]["cache"][username]["exists"]
else:
self.dict[social_network]["cache"][username] = dict()
url = self.dict.get(social_network).get("url").format(username)
error_type = self.dict.get(social_network).get("errorType")