mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-13 06:59:53 -05:00
test
This commit is contained in:
parent
d2441d7c7d
commit
9afa434b17
@ -12,6 +12,8 @@ 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
|
||||||
|
|
||||||
|
|
||||||
@ -100,11 +102,12 @@ class Search():
|
|||||||
# url base
|
# url base
|
||||||
url = str(searchdict["url"])
|
url = str(searchdict["url"])
|
||||||
# query
|
# query
|
||||||
url += str(self.valid_api[searchdict["query_type"]]) + str(searchdict["query"])
|
url += str(self.valid_api[searchdict["query_param"]]) + str(searchdict["query"])
|
||||||
# nsfw search? TODO
|
# nsfw search? TODO
|
||||||
# additional parts
|
# additional parts
|
||||||
if "additional_url" in list(self.valid_api[searchdict["query_type"]].keys()):
|
if "additional_url" in list(self.valid_api[searchdict["query_type"]].keys()):
|
||||||
url += str(self.valid_api[searchdict["query_type"]]['additional_url'])
|
url += str(self.valid_api[searchdict["query_type"]]['additional_url'])
|
||||||
|
logs.log('SpiceBot_Search', str(url))
|
||||||
return url
|
return url
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
"url": "http://www.google.com/maps/place/",
|
"url": "http://www.google.com/maps/place/",
|
||||||
"query": '',
|
"query": '',
|
||||||
|
"query_param": '',
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"url": "http://www.google.com/search?",
|
"url": "http://www.google.com/search?",
|
||||||
"query": 'q=',
|
"query_param": 'q=',
|
||||||
"additional_url": "&btnI",
|
"additional_url": "&btnI",
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"url": "http://community.spiceworks.com/search?",
|
"url": "http://community.spiceworks.com/search?",
|
||||||
"query": 'query=',
|
"query_param": 'query=',
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"url": "http://www.youtube.com/search?",
|
"url": "http://www.youtube.com/search?",
|
||||||
"query": 'q=',
|
"query_param": 'q=',
|
||||||
"additional_url": "&btnI",
|
"additional_url": "&btnI",
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user