SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
Python bingbravedegoogleduckduckgogooglemetasearchprivacypythonqwantsearchsearch-enginesearxsearxngstartpageyahoo
[fix] unused globals removed
Adam Tauber66f02dc2b6b0
diff --git a/searx/engines/bing.py b/searx/engines/bing.pyindex 9712a3103..88b097289 100644--- a/searx/engines/bing.py+++ b/searx/engines/bing.py@@ -27,7 +27,6 @@ def request(query, params):def response(resp):- global base_urlresults = []dom = html.fromstring(resp.content)for result in dom.xpath('//div[@class="sa_cc"]'):diff --git a/searx/engines/bing_news.py b/searx/engines/bing_news.pyindex 5b48a5450..56c6f1208 100644--- a/searx/engines/bing_news.py+++ b/searx/engines/bing_news.py@@ -29,7 +29,6 @@ def request(query, params):def response(resp):- global base_urlresults = []dom = html.fromstring(resp.content)for result in dom.xpath('//div[@class="sa_cc"]'):diff --git a/searx/engines/currency_convert.py b/searx/engines/currency_convert.pyindex ce6b3b854..561527bce 100644--- a/searx/engines/currency_convert.py+++ b/searx/engines/currency_convert.py@@ -31,7 +31,6 @@ def request(query, params):def response(resp):- global base_urlresults = []try:_, conversion_rate, _ = resp.text.split(',', 2)diff --git a/searx/engines/deviantart.py b/searx/engines/deviantart.pyindex d42a25a19..298b9a397 100644--- a/searx/engines/deviantart.py+++ b/searx/engines/deviantart.py@@ -18,7 +18,6 @@ def request(query, params):def response(resp):- global base_urlresults = []if resp.status_code == 302:return resultsdiff --git a/searx/engines/github.py b/searx/engines/github.pyindex be2cfe7c5..d36797aba 100644--- a/searx/engines/github.py+++ b/searx/engines/github.py@@ -10,7 +10,6 @@ accept_header = 'application/vnd.github.preview.text-match+json'def request(query, params):- global search_urlparams['url'] = search_url.format(query=urlencode({'q': query}))params['headers']['Accept'] = accept_headerreturn paramsdiff --git a/searx/engines/soundcloud.py b/searx/engines/soundcloud.pyindex e28fb1600..07cdbc273 100644--- a/searx/engines/soundcloud.py+++ b/searx/engines/soundcloud.py@@ -18,7 +18,6 @@ def request(query, params):def response(resp):- global base_urlresults = []search_res = loads(resp.text)for result in search_res.get('collection', []):diff --git a/searx/engines/twitter.py b/searx/engines/twitter.pyindex 23393ac4d..c05c20fc2 100644--- a/searx/engines/twitter.py+++ b/searx/engines/twitter.py@@ -12,13 +12,11 @@ content_xpath = './/p[@class="js-tweet-text tweet-text"]//text()'def request(query, params):- global search_urlparams['url'] = search_url + urlencode({'q': query})return paramsdef response(resp):- global base_urlresults = []dom = html.fromstring(resp.text)for tweet in dom.xpath('//li[@data-item-type="tweet"]'):