mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-13 06:59:53 -05:00
remove logging
This commit is contained in:
parent
271d945eee
commit
d2441d7c7d
@ -12,8 +12,6 @@ from .Config import config as botconfig
|
|||||||
from .Read import read as botread
|
from .Read import read as botread
|
||||||
from .Commands import commands as botcommands
|
from .Commands import commands as botcommands
|
||||||
|
|
||||||
from .Logs import logs
|
|
||||||
|
|
||||||
# TODO add a cache flush
|
# TODO add a cache flush
|
||||||
|
|
||||||
|
|
||||||
@ -62,6 +60,9 @@ class Search():
|
|||||||
for key in query_defaults:
|
for key in query_defaults:
|
||||||
if key not in list(searchdict.keys()):
|
if key not in list(searchdict.keys()):
|
||||||
searchdict[key] = query_defaults[key]
|
searchdict[key] = query_defaults[key]
|
||||||
|
for key in list(self.valid_api[searchdict["query_type"]].keys()):
|
||||||
|
if key not in list(searchdict.keys()):
|
||||||
|
searchdict[key] = self.valid_api[searchdict["query_type"]][key]
|
||||||
|
|
||||||
# Replace spaces in search query
|
# Replace spaces in search query
|
||||||
searchdict["searchquery"] = urllib.request.pathname2url(searchdict["query"])
|
searchdict["searchquery"] = urllib.request.pathname2url(searchdict["query"])
|
||||||
@ -91,14 +92,13 @@ class Search():
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
var = e
|
var = e
|
||||||
var = None
|
var = None
|
||||||
logs.log('SpiceBot_Search', str(e))
|
|
||||||
if not var or not var.url:
|
if not var or not var.url:
|
||||||
return None
|
return None
|
||||||
return var.url
|
return var.url
|
||||||
|
|
||||||
def search_url_assemble(self, searchdict):
|
def search_url_assemble(self, searchdict):
|
||||||
# url base
|
# url base
|
||||||
url = str(searchdict["searchurl"])
|
url = str(searchdict["url"])
|
||||||
# query
|
# query
|
||||||
url += str(self.valid_api[searchdict["query_type"]]) + str(searchdict["query"])
|
url += str(self.valid_api[searchdict["query_type"]]) + str(searchdict["query"])
|
||||||
# nsfw search? TODO
|
# nsfw search? TODO
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user