From b0e20419898bbe49b52586e68360726a19135ab2 Mon Sep 17 00:00:00 2001 From: Thorsten Date: Wed, 6 Sep 2017 21:53:54 +0200 Subject: [PATCH] assume the order is better the other way round? --- plugins/searx.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/searx.py b/plugins/searx.py index 4196e17..a8b0ffa 100644 --- a/plugins/searx.py +++ b/plugins/searx.py @@ -77,7 +77,7 @@ def searx(text): search_list = fetch_all_searx_engines() logger = logging.getLogger(__name__) - url = search_list[-1] + url = search_list[0] logger.info('Currently feeding from {} (of {} in stock)'.format(url, len(search_list))) response = requests.get(url, params={ 'q': text, @@ -85,13 +85,13 @@ def searx(text): 'lang': 'de' }) if response.status_code == 429: - search_list.pop() + search_list.pop(0) raise RateLimitingError(response=response, request=response.request) try: response = response.json() except json.JSONDecodeError: # "maintenance" they say... - search_list.pop() + search_list.pop(0) raise if not response['results']: