diff options
| author | Alexandre Flament <alex@al-f.net> | 2020-09-12 15:33:03 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-12 15:33:03 +0200 |
| commit | ae07f4a211ecba0331bcab5903e3263c646f8bdb (patch) | |
| tree | ea6271d1bee6e803e0200b7db50bd0b6d5ce56c4 /searx | |
| parent | 2370234d0978f59dd62efa4a4931e41ad31444d1 (diff) | |
| parent | df12ed6e5563e9c78c98ca31ee11ce5fc508bc2a (diff) | |
Merge pull request #2185 from dalf/rawtextquery-auto-parse
[mod] searx.RawTextQuery: the constructor call parse_query
Diffstat (limited to 'searx')
| -rw-r--r-- | searx/query.py | 3 | ||||
| -rw-r--r-- | searx/search.py | 1 | ||||
| -rwxr-xr-x | searx/webapp.py | 1 |
3 files changed, 2 insertions, 3 deletions
diff --git a/searx/query.py b/searx/query.py index ef323af7a..6eba2cbd6 100644 --- a/searx/query.py +++ b/searx/query.py @@ -45,10 +45,11 @@ class RawTextQuery: self.timeout_limit = None self.external_bang = None self.specific = False + self._parse_query() # parse query, if tags are set, which # change the search engine or search-language - def parse_query(self): + def _parse_query(self): self.query_parts = [] # split query, including whitespaces diff --git a/searx/search.py b/searx/search.py index 3695128ab..66e3d62d8 100644 --- a/searx/search.py +++ b/searx/search.py @@ -266,7 +266,6 @@ def get_search_query_from_webapp(preferences, form): # parse query, if tags are set, which change # the serch engine or search-language raw_text_query = RawTextQuery(form['q'], disabled_engines) - raw_text_query.parse_query() # set query query = raw_text_query.getSearchQuery() diff --git a/searx/webapp.py b/searx/webapp.py index a1b0413aa..89cbed3be 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -737,7 +737,6 @@ def autocompleter(): # parse query raw_text_query = RawTextQuery(str(request.form.get('q', b'')), disabled_engines) - raw_text_query.parse_query() # check if search query is set if not raw_text_query.getSearchQuery(): |