diff --git a/searx/engines/bing.py b/searx/engines/bing.py index 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_url results = [] 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.py index 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_url results = [] 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.py index 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_url results = [] try: _, conversion_rate, _ = resp.text.split(',', 2) diff --git a/searx/engines/deviantart.py b/searx/engines/deviantart.py index 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_url results = [] if resp.status_code == 302: return results diff --git a/searx/engines/github.py b/searx/engines/github.py index 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_url params['url'] = search_url.format(query=urlencode({'q': query})) params['headers']['Accept'] = accept_header return params diff --git a/searx/engines/soundcloud.py b/searx/engines/soundcloud.py index 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_url results = [] search_res = loads(resp.text) for result in search_res.get('collection', []): diff --git a/searx/engines/twitter.py b/searx/engines/twitter.py index 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_url params['url'] = search_url + urlencode({'q': query}) return params def response(resp): - global base_url results = [] dom = html.fromstring(resp.text) for tweet in dom.xpath('//li[@data-item-type="tweet"]'):