mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-12 14:39:54 -05:00
identifiers
This commit is contained in:
parent
0cdf5230e5
commit
d98af55a04
@ -31,10 +31,13 @@ class Sherlock():
|
|||||||
self.dict[social_network]["cache"] = dict()
|
self.dict[social_network]["cache"] = dict()
|
||||||
|
|
||||||
def check_network(self, username, social_network):
|
def check_network(self, username, social_network):
|
||||||
|
username = str(username)
|
||||||
|
|
||||||
if username in list(self.dict[social_network]["cache"].keys()):
|
if username in list(self.dict[social_network]["cache"].keys()):
|
||||||
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 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)
|
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