Commit 00642228 authored by Nicolas Gelot's avatar Nicolas Gelot

Move SearchData in results module

parent 743ed248
......@@ -317,3 +317,23 @@ class ResultContainer(object):
def add_unresponsive_engine(self, engine_error):
self.unresponsive_engines.add(engine_error)
class SearchData(object):
def __init__(self, search_query, results, paging,
results_number, answers, corrections, infoboxes, suggestions, unresponsive_engines):
self.categories = search_query.categories
self.query = search_query.query
self.pageno = search_query.pageno
self.safe_search = search_query.safesearch
self.language = search_query.lang
self.time_range = search_query.time_range
self.engines = search_query.engines
self.results = results
self.paging = paging
self.results_number = results_number
self.answers = answers
self.corrections = corrections
self.infoboxes = infoboxes
self.suggestions = suggestions
self.unresponsive_engines = unresponsive_engines
......@@ -8,26 +8,7 @@ from searx import settings
from searx.plugins import plugins
from searx.query import SearchQuery
from searx.url_utils import urlparse
class SearchData(object):
def __init__(self, search_query, results, paging,
results_number, answers, corrections, infoboxes, suggestions, unresponsive_engines):
self.categories = search_query.categories
self.query = search_query.query
self.pageno = search_query.pageno
self.safe_search = search_query.safesearch
self.language = search_query.lang
self.time_range = search_query.time_range
self.engines = search_query.engines
self.results = results
self.paging = paging
self.results_number = results_number
self.answers = answers
self.corrections = corrections
self.infoboxes = infoboxes
self.suggestions = suggestions
self.unresponsive_engines = unresponsive_engines
from searx.results import SearchData
def _get_connection(host):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment