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

.c shouldn't scrape DuckDuckGo HTML #161

Open
auscompgeek opened this issue Apr 3, 2015 · 5 comments
Open

.c shouldn't scrape DuckDuckGo HTML #161

auscompgeek opened this issue Apr 3, 2015 · 5 comments

Comments

@auscompgeek
Copy link
Contributor

The DuckDuckGo API returns calculations perfectly fine...

Moreover, why is it scraping HTML before trying the API?

@auscompgeek
Copy link
Contributor Author

A side effect of attempting to scrape HTML before using the API: if BeautifulSoup isn't installed, it borks completely, where it could potentially get a result.

@kaneda
Copy link
Contributor

kaneda commented Apr 6, 2015

@auscompgeek this is explicitly mentioned in the readme: https://github.com/myano/jenni

@auscompgeek
Copy link
Contributor Author

@kaneda Yes, but it causes an exception, so it doesn't even attempt to get a result from the DDG API or from Wolfram|Alpha.

myano added a commit that referenced this issue Apr 7, 2015
@myano
Copy link
Owner

myano commented Apr 29, 2015

The "HTML" is scraped first before the API, because a) many times the "HTML" pages has a simpler answer and b) sometimes it is faster. I believe there was another reason of why I originally did it that way, but I can't remember any other reasons as of now.

@myano
Copy link
Owner

myano commented Jul 8, 2015

Personally, I really wish the google results for .c were more reliable in jenni. They seem/work more reliably when done in a browser.

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

No branches or pull requests

3 participants