mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-12 22:49:53 -05:00
test
This commit is contained in:
parent
d7fb2bab9f
commit
171b0f9a52
@ -46,6 +46,7 @@ class Search():
|
|||||||
# check cache
|
# check cache
|
||||||
if search_api not in list(self.cache.keys()):
|
if search_api not in list(self.cache.keys()):
|
||||||
self.cache[search_api] = dict()
|
self.cache[search_api] = dict()
|
||||||
|
logs.log("SpiceBot_Search", "Found " + str(len(list(self.valid_api.keys()))) + " search APIs", True)
|
||||||
|
|
||||||
def setup_search(self):
|
def setup_search(self):
|
||||||
botconfig.define_section("SpiceBot_Search", SpiceBot_Search_MainSection, validate=False)
|
botconfig.define_section("SpiceBot_Search", SpiceBot_Search_MainSection, validate=False)
|
||||||
@ -122,7 +123,7 @@ class Search():
|
|||||||
data = requests.get(searchdict["searchurl"])
|
data = requests.get(searchdict["searchurl"])
|
||||||
data = json.loads(data.decode('utf-8'))
|
data = json.loads(data.decode('utf-8'))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logs.log(str(e), True)
|
logs.log("SpiceBot_Search", str(e), True)
|
||||||
data = e
|
data = e
|
||||||
return None
|
return None
|
||||||
if data['result_type'] == 'no_results':
|
if data['result_type'] == 'no_results':
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user