on master help sign in
Merge pull request #2830 from jordemort/pypi

Add xpath configuration for PyPI

commit02675639705195c8fd8b180921906000dde2bef1 authorNoémi Ványi <kvch@users.noreply.github.com> dateMon 31 May 2021, 20:36 (5 years ago) parentc8d2b5e66d06b0
1 file changed+22−2
searx/settings.yml+22−2
searx/settings.yml+22−2
@@ -219,7 +219,7 @@ engines:
219219 engine : wikipedia
220220 shortcut : wp
221221 base_url : 'https://{language}.wikipedia.org/'
222−
222+
223223 #The fulltext and title parameter is necessary for Wikimini because sometimes it will not show the results and redirect instead
224224 - name: wikimini
225225 engine: xpath
@@ -892,6 +892,26 @@ engines:
892892 categories: science
893893 timeout : 3.0
894894
895+ - name : pypi
896+ shortcut: pypi
897+ engine: xpath
898+ paging : True
899+ search_url : https://pypi.org/search?q={query}&page={pageno}
900+ results_xpath: /html/body/main/div/div/div/form/div/ul/li/a[@class="package-snippet"]
901+ url_xpath : ./@href
902+ title_xpath : ./h3/span[@class="package-snippet__name"]
903+ content_xpath : ./p
904+ suggestion_xpath : /html/body/main/div/div/div/form/div/div[@class="callout-block"]/p/span/a[@class="link"]
905+ first_page_num : 1
906+ categories: it
907+ about:
908+ website: https://pypi.org
909+ wikidata_id: Q2984686
910+ official_api_documentation: https://warehouse.readthedocs.io/api-reference/index.html
911+ use_official_api: false
912+ require_api_key: false
913+ results: HTML
914+
895915 - name : qwant
896916 engine : qwant
897917 shortcut : qw
@@ -1290,7 +1310,7 @@ engines:
12901310 use_official_api: false
12911311 require_api_key: false
12921312 results: HTML
1293−
1313+
12941314 - name : dogpile
12951315 shortcut : dp
12961316 engine : xpath