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

Engine implementations: add dedicated Exception #1676

Open
dalf opened this issue Aug 9, 2019 · 0 comments

Comments

@dalf
Copy link
Collaborator

commented Aug 9, 2019

Right now, the google engine throws a RuntimeWarning('sorry.google.com').

It would be easier to have SearxEngineBlockException (or better name). The same exception could be used in the Yandex engine and some others.

In the same spirit, an SearxEngineParsingException exception would help: it would clearly shows that searx code has detected some change on the website.

It starts to be tricky when:

  • there is a parsing error on some fields and / or results
  • but most of data have been parsed.

Ideally the result of the response function should a second returned value with a list of warning.

Some statistics could be done, for example % of (warnings|errors) for all the requests (percentage by error type).

It would help to detect an engine that needs an update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.