mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-13 15:09:54 -05:00
better
This commit is contained in:
parent
827449c974
commit
7612380380
@ -33,11 +33,8 @@ class Sherlock():
|
|||||||
def check_network(self, username, social_network):
|
def check_network(self, username, social_network):
|
||||||
|
|
||||||
if username in list(self.dict[social_network]["cache"].keys()):
|
if username in list(self.dict[social_network]["cache"].keys()):
|
||||||
if not self.dict[social_network]["cache"][username]["exists"]:
|
if time.time() - self.dict[social_network]["cache"][username]["time"] <= 1800:
|
||||||
if time.time() - self.dict[social_network]["cache"][username]["time"] <= 1800:
|
return self.dict[social_network]["cache"][username]["exists"]
|
||||||
return True
|
|
||||||
else:
|
|
||||||
return True
|
|
||||||
|
|
||||||
url = self.dict.get(social_network).get("url").format(username)
|
url = self.dict.get(social_network).get("url").format(username)
|
||||||
error_type = self.dict.get(social_network).get("errorType")
|
error_type = self.dict.get(social_network).get("errorType")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user