mirror of
https://github.com/searx/searx
synced 2025-08-31 14:38:23 +00:00
[fix] wikipedia engine: don't raise an error when the query is not found
Add a new parameter "raise_for_status", set by default to True. When True, any HTTP status code >= 300 raise an exception ( #2332 ) When False, the engine can manage the HTTP status code by itself.
This commit is contained in:
@@ -134,9 +134,9 @@ The function ``def request(query, params):`` always returns the ``params``
|
||||
variable. Inside searx, the following paramters can be used to specify a search
|
||||
request:
|
||||
|
||||
================== =========== ========================================================================
|
||||
================== =========== ==========================================================================
|
||||
argument type information
|
||||
================== =========== ========================================================================
|
||||
================== =========== ==========================================================================
|
||||
url string requested url
|
||||
method string HTTP request method
|
||||
headers set HTTP header information
|
||||
@@ -145,7 +145,8 @@ cookies set HTTP cookies
|
||||
verify boolean Performing SSL-Validity check
|
||||
max_redirects int maximum redirects, hard limit
|
||||
soft_max_redirects int maximum redirects, soft limit. Record an error but don't stop the engine
|
||||
================== =========== ========================================================================
|
||||
raise_for_status bool True by default: raise an exception if the HTTP code of response is >= 300
|
||||
================== =========== ==========================================================================
|
||||
|
||||
|
||||
example code
|
||||
|
Reference in New Issue
Block a user