From 923b490022ae51745d24efd9aa0f699836a516ee Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Tue, 26 Jan 2021 11:46:36 +0100 Subject: [PATCH] [mod] add Makfile targets for search.checker. To check all engines: make search.checker To check a engine 'google news' replace space by underline: make search.checker.google_news To see HTTP requests and more use SEARX_DEBUG: make SEARX_DEBUG=1 search.checker.google_news To filter out HTTP redirects: make SEARX_DEBUG=1 search.checker.google_news | grep -A1 "HTTP/1.1\" 3[0-9][0-9]" ... Engine google news Checking https://news.google.com:443 "GET /search?q=life&hl=en&lr=lang_en&ie=utf8&oe=utf8&ceid=US%3Aen&gl=US HTTP/1.1" 302 0 https://news.google.com:443 "GET /search?q=life&hl=en-US&lr=lang_en&ie=utf8&oe=utf8&ceid=US:en&gl=US HTTP/1.1" 200 None -- https://news.google.com:443 "GET /search?q=computer&hl=en&lr=lang_en&ie=utf8&oe=utf8&ceid=US%3Aen&gl=US HTTP/1.1" 302 0 https://news.google.com:443 "GET /search?q=computer&hl=en-US&lr=lang_en&ie=utf8&oe=utf8&ceid=US:en&gl=US HTTP/1.1" 200 None -- Signed-off-by: Markus Heiser --- Makefile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 55b74478..c52e93cd 100644 --- a/Makefile +++ b/Makefile @@ -166,6 +166,18 @@ PHONY += gecko.driver gecko.driver: $(PY_ENV_ACT); ./manage.sh install_geckodriver +# search.checker +# -------------- + +search.checker: pyenvinstall + $(Q)$(PY_ENV_ACT); searx-checker -v + +ENGINE_TARGETS=$(patsubst searx/engines/%.py,search.checker.%,$(wildcard searx/engines/[!_]*.py)) + +$(ENGINE_TARGETS): pyenvinstall + $(Q)$(PY_ENV_ACT); searx-checker -v "$(subst _, ,$(patsubst search.checker.%,%,$@))" + + # test # ---- @@ -180,7 +192,8 @@ PYLINT_FILES=\ searx/engines/digg.py \ searx/engines/google.py \ searx/engines/google_news.py \ - searx/engines/google_videos.py + searx/engines/google_videos.py \ + searx/engines/google_images.py test.pylint: pyenvinstall $(call cmd,pylint,$(PYLINT_FILES))