From 4623a3d9a50c3bccec345adfba98616ffc69157b Mon Sep 17 00:00:00 2001 From: depsterr Date: Fri, 29 Dec 2023 15:05:37 +0100 Subject: [PATCH] remove unused searx engine file --- shared/nlabsearch.py | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 shared/nlabsearch.py diff --git a/shared/nlabsearch.py b/shared/nlabsearch.py deleted file mode 100644 index 063b2b6..0000000 --- a/shared/nlabsearch.py +++ /dev/null @@ -1,32 +0,0 @@ -from bs4 import BeautifulSoup - -baseurl = "https://ncatlab.org" - -about = { - "website": baseurl + "/nlab/show/HomePage", - "use_official_api": False, - "require_api_key": False, - "results": "html" -} - -# basic search -def request(query, params): - params["url"] = baseurl + f"/nlab/search?query={query}" - return params - -def response(resp): - - res = [] - - soup = BeautifulSoup(resp.content) - - for entry in soup.select("#Content ul li a"): - url = baseurl + entry["href"] - title = entry.string - res_dict = { - "url": url, - "title": title, - } - res.append(res_dict) - - return res