Merge pull request #67 from deathbybandaid/development

identifiers
This commit is contained in:
Deathbybandaid 2019-06-19 08:07:49 -04:00 committed by GitHub
commit 85e92b1080
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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")