.oO SearXNG Developer Documentation Oo.
Loading...
Searching...
No Matches
searx.search.processors.online_url_search.OnlineUrlSearchProcessor Class Reference
+ Inheritance diagram for searx.search.processors.online_url_search.OnlineUrlSearchProcessor:
+ Collaboration diagram for searx.search.processors.online_url_search.OnlineUrlSearchProcessor:

Public Member Functions

 get_params (self, search_query, engine_category)
 
- Public Member Functions inherited from searx.search.processors.online.OnlineProcessor
 initialize (self)
 
 search (self, query, params, result_container, start_time, timeout_limit)
 
 get_default_tests (self)
 
- Public Member Functions inherited from searx.search.processors.abstract.EngineProcessor
 __init__ (self, engine, str engine_name)
 
 has_initialize_function (self)
 
 handle_exception (self, result_container, exception_or_message, suspend=False)
 
 extend_container (self, result_container, start_time, search_results)
 
 extend_container_if_suspended (self, result_container)
 
 get_tests (self)
 

Static Public Attributes

str engine_type = 'online_url_search'
 
- Static Public Attributes inherited from searx.search.processors.online.OnlineProcessor
str engine_type = 'online'
 

Additional Inherited Members

- Public Attributes inherited from searx.search.processors.online.OnlineProcessor
 engine_name
 
 engine
 
- Public Attributes inherited from searx.search.processors.abstract.EngineProcessor
 engine = engine
 
 engine_name = engine_name
 
 logger = engines[engine_name].logger
 
 suspended_status = SUSPENDED_STATUS.setdefault(key, SuspendedStatus())
 
- Protected Member Functions inherited from searx.search.processors.online.OnlineProcessor
 _send_http_request (self, params)
 
 _search_basic (self, query, params)
 
- Protected Member Functions inherited from searx.search.processors.abstract.EngineProcessor
 _extend_container_basic (self, result_container, start_time, search_results)
 

Detailed Description

Processor class used by ``online_url_search`` engines.

Definition at line 16 of file online_url_search.py.

Member Function Documentation

◆ get_params()

searx.search.processors.online_url_search.OnlineUrlSearchProcessor.get_params ( self,
search_query,
engine_category )
Returns a set of :ref:`request params <engine request online>` or ``None`` if
search query does not match to :py:obj:`re_search_urls`.

Reimplemented from searx.search.processors.online.OnlineProcessor.

Definition at line 21 of file online_url_search.py.

21 def get_params(self, search_query, engine_category):
22 """Returns a set of :ref:`request params <engine request online>` or ``None`` if
23 search query does not match to :py:obj:`re_search_urls`.
24 """
25
26 params = super().get_params(search_query, engine_category)
27 if params is None:
28 return None
29
30 url_match = False
31 search_urls = {}
32
33 for k, v in re_search_urls.items():
34 m = v.search(search_query.query)
35 v = None
36 if m:
37 url_match = True
38 v = m[0]
39 search_urls[k] = v
40
41 if not url_match:
42 return None
43
44 params['search_urls'] = search_urls
45 return params

References searx.search.processors.online_url_search.OnlineUrlSearchProcessor.get_params().

Referenced by searx.search.processors.online_url_search.OnlineUrlSearchProcessor.get_params().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ engine_type

str searx.search.processors.online_url_search.OnlineUrlSearchProcessor.engine_type = 'online_url_search'
static

Definition at line 19 of file online_url_search.py.


The documentation for this class was generated from the following file: