.oO SearXNG Developer Documentation Oo.
Loading...
Searching...
No Matches
searx.query.FeelingLuckyParser Class Reference
+ Inheritance diagram for searx.query.FeelingLuckyParser:
+ Collaboration diagram for searx.query.FeelingLuckyParser:

Public Member Functions

 __call__ (self, raw_value)
 
- Public Member Functions inherited from searx.query.QueryPartParser
 __init__ (self, raw_text_query, enable_autocomplete)
 

Static Public Member Functions

 check (raw_value)
 

Additional Inherited Members

- Public Attributes inherited from searx.query.QueryPartParser
 raw_text_query
 
 enable_autocomplete
 
- Protected Member Functions inherited from searx.query.QueryPartParser
 _add_autocomplete (self, value)
 

Detailed Description

Definition at line 240 of file query.py.

Member Function Documentation

◆ __call__()

searx.query.FeelingLuckyParser.__call__ ( self,
raw_value )
Try to parse raw_value: set the self.raw_text_query properties

return True if raw_value has been parsed

self.raw_text_query.autocomplete_list is also modified
if self.enable_autocomplete is True

Reimplemented from searx.query.QueryPartParser.

Definition at line 245 of file query.py.

245 def __call__(self, raw_value):
246 self.raw_text_query.redirect_to_first_result = True
247 return True
248
249

References searx.query.QueryPartParser.raw_text_query.

◆ check()

searx.query.FeelingLuckyParser.check ( raw_value)
static
Check if raw_value can be parsed

Reimplemented from searx.query.QueryPartParser.

Definition at line 242 of file query.py.

242 def check(raw_value):
243 return raw_value == '!!'
244

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