diff options
author | Adam Tauber <asciimoo@gmail.com> | 2021-03-02 14:24:55 +0100 |
---|---|---|
committer | Adam Tauber <asciimoo@gmail.com> | 2021-03-06 12:12:35 +0100 |
commit | 44f4a9d49a0d78668b37fca8558ae63c5fdef271 (patch) | |
tree | 5eb04f4a6efc0537fc21d019990428b4a9b5c4b6 /searx/search/models.py | |
parent | 87f4cc4a9e51f1215f1450ea056ac40e7a961978 (diff) | |
download | searxng-44f4a9d49a0d78668b37fca8558ae63c5fdef271.tar.gz searxng-44f4a9d49a0d78668b37fca8558ae63c5fdef271.zip |
[enh] add ability to send engine data to subsequent requests
Diffstat (limited to 'searx/search/models.py')
-rw-r--r-- | searx/search/models.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/searx/search/models.py b/searx/search/models.py index 80ceaa223..21c0fe590 100644 --- a/searx/search/models.py +++ b/searx/search/models.py @@ -25,7 +25,7 @@ class SearchQuery: """container for all the search parameters (query, language, etc...)""" __slots__ = 'query', 'engineref_list', 'lang', 'safesearch', 'pageno', 'time_range',\ - 'timeout_limit', 'external_bang' + 'timeout_limit', 'external_bang', 'engine_data' def __init__(self, query: str, @@ -35,7 +35,8 @@ class SearchQuery: pageno: int=1, time_range: typing.Optional[str]=None, timeout_limit: typing.Optional[float]=None, - external_bang: typing.Optional[str]=None): + external_bang: typing.Optional[str]=None, + engine_data: typing.Optional[dict]=None): self.query = query self.engineref_list = engineref_list self.lang = lang @@ -44,6 +45,9 @@ class SearchQuery: self.time_range = time_range self.timeout_limit = timeout_limit self.external_bang = external_bang + self.engine_data = engine_data + if engine_data is None: + self.engine_data = {} @property def categories(self): |