mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-10 21:50:59 -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 .Commands import commands as botcommands
|
||||
|
||||
from .Logs import logs
|
||||
|
||||
# TODO add a cache flush
|
||||
|
||||
|
||||
@ -100,11 +102,12 @@ class Search():
|
||||
# url base
|
||||
url = str(searchdict["url"])
|
||||
# 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
|
||||
# additional parts
|
||||
if "additional_url" in list(self.valid_api[searchdict["query_type"]].keys()):
|
||||
url += str(self.valid_api[searchdict["query_type"]]['additional_url'])
|
||||
logs.log('SpiceBot_Search', str(url))
|
||||
return url
|
||||
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
{
|
||||
"url": "http://www.google.com/maps/place/",
|
||||
"query": '',
|
||||
"query_param": '',
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"url": "http://www.google.com/search?",
|
||||
"query": 'q=',
|
||||
"query_param": 'q=',
|
||||
"additional_url": "&btnI",
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{
|
||||
"url": "http://community.spiceworks.com/search?",
|
||||
"query": 'query=',
|
||||
"query_param": 'query=',
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"url": "http://www.youtube.com/search?",
|
||||
"query": 'q=',
|
||||
"query_param": 'q=',
|
||||
"additional_url": "&btnI",
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user