From 66d06b05fecd36a9af4f42badd9cde1b7eb99186 Mon Sep 17 00:00:00 2001 From: Jordan Webb Date: Fri, 28 May 2021 16:32:32 -0500 Subject: [PATCH] Add xpath configuration for PyPI --- searx/settings.yml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/searx/settings.yml b/searx/settings.yml index ac71f93a..92aa237c 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -219,7 +219,7 @@ engines: engine : wikipedia shortcut : wp base_url : 'https://{language}.wikipedia.org/' - + #The fulltext and title parameter is necessary for Wikimini because sometimes it will not show the results and redirect instead - name: wikimini engine: xpath @@ -892,6 +892,26 @@ engines: categories: science timeout : 3.0 + - name : pypi + shortcut: pypi + engine: xpath + paging : True + search_url : https://pypi.org/search?q={query}&page={pageno} + results_xpath: /html/body/main/div/div/div/form/div/ul/li/a[@class="package-snippet"] + url_xpath : ./@href + title_xpath : ./h3/span[@class="package-snippet__name"] + content_xpath : ./p + suggestion_xpath : /html/body/main/div/div/div/form/div/div[@class="callout-block"]/p/span/a[@class="link"] + first_page_num : 1 + categories: it + about: + website: https://pypi.org + wikidata_id: Q2984686 + official_api_documentation: https://warehouse.readthedocs.io/api-reference/index.html + use_official_api: false + require_api_key: false + results: HTML + - name : qwant engine : qwant shortcut : qw @@ -1281,7 +1301,7 @@ engines: use_official_api: false require_api_key: false results: HTML - + - name : dogpile shortcut : dp engine : xpath