mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-09 22:53:06 -04:00
add duckduckgo
This commit is contained in:
parent
dbab603e7b
commit
8657b8c93b
5 changed files with 293 additions and 0 deletions
|
@ -38,6 +38,7 @@ const Api = Object.freeze({
|
|||
|
||||
SEARCH_BING: '/search/bing',
|
||||
SEARCH_BING_IMAGES: '/search/bing-images',
|
||||
SEARCH_DUCKDUCKGO: '/search/duckduckgo',
|
||||
SEARCH_GOOGLE: '/search/google',
|
||||
SEARCH_GOOGLE_IMAGES: '/search/google-images',
|
||||
SEARCH_GOOGLE_NEWS: '/search/google-news',
|
||||
|
|
|
@ -196,6 +196,13 @@ module.exports.bingImages = async function(context, query, nsfw){
|
|||
})
|
||||
}
|
||||
|
||||
module.exports.duckduckgo = async function(context, query, nsfw){
|
||||
return await request(Api.SEARCH_DUCKDUCKGO, "GET", {}, {
|
||||
q: query,
|
||||
nsfw: nsfw
|
||||
})
|
||||
}
|
||||
|
||||
module.exports.reverseImageSearch = async function(context, url){
|
||||
return await request(Api.SEARCH_REVERSE_IMAGE, "GET", {}, {
|
||||
url: url
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue