Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Routing of unknown queries to DuckDuckGo. #4

Open
Dizzy611 opened this issue Oct 28, 2019 · 2 comments
Open

Feature Request: Routing of unknown queries to DuckDuckGo. #4

Dizzy611 opened this issue Oct 28, 2019 · 2 comments

Comments

@Dizzy611
Copy link
Contributor

Dizzy611 commented Oct 28, 2019

Questions of the form (question helper) is (x)? (ie what/who/where/why/how is (x)) should be routed to duckduckgo verbatim. This mirrors the way Cortana uses Bing to answer unknown queries, and is an easy way to expand functionality.

@Dizzy611
Copy link
Contributor Author

Dizzy611 commented Oct 28, 2019

Example interaction:

[11:50] User; @birdbot where is the taj mahal?
[11:50] BOTbirdbot: @user: Taj Mahal - Wikipedia
https://en.wikipedia.org/wiki/Taj_Mahal
The Taj Mahal is an ivory-white marble mausoleum on the south bank of the Yamuna river in the Indian city of Agra.
Further results: https://duckduckgo.com/?q=where+is+the+taj+mahal

@Dizzy611
Copy link
Contributor Author

Dizzy611 commented Oct 28, 2019

Worth noting apparently DDG does not want you doing this for full search results (not that that has ever stopped me for small, personal-use bots like this), but a query like the above might work with their "instant answers" API which has an official endpoint:

https://duckduckgo.com/api

Maybe see if that has a useful answer first and go the unsupported full HTML parsing route only if it does not?

Probably just start out by supporting instant answers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant