From 811837d1098b5c09fb2da58cf5a9cf25db41b9e1 Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Sun, 26 Dec 2021 23:08:25 +0100 Subject: [PATCH] [remove] searxng_extra/google_search.py remove deprecated script --- searxng_extra/google_search.py | 37 ---------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 searxng_extra/google_search.py diff --git a/searxng_extra/google_search.py b/searxng_extra/google_search.py deleted file mode 100644 index 34b40c0f2..000000000 --- a/searxng_extra/google_search.py +++ /dev/null @@ -1,37 +0,0 @@ -# SPDX-License-Identifier: AGPL-3.0-or-later - -from sys import argv, exit - -if not len(argv) > 1: - print('search query required') - exit(1) - -import requests -from json import dumps -from searx.engines import google -from searx.search import default_request_params - -request_params = default_request_params() -# Possible params -# request_params['headers']['User-Agent'] = '' -# request_params['category'] = '' -request_params['pageno'] = 1 -request_params['language'] = 'en_us' -request_params['time_range'] = '' - -params = google.request(argv[1], request_params) - -request_args = dict( - headers=request_params['headers'], - cookies=request_params['cookies'], -) - -if request_params['method'] == 'GET': - req = requests.get -else: - req = requests.post - request_args['data'] = request_params['data'] - -resp = req(request_params['url'], **request_args) -resp.search_params = request_params -print(dumps(google.response(resp)))