From ef246b76616cc645a7d49528750301e35e02652b Mon Sep 17 00:00:00 2001 From: Allen <64094914+allendema@users.noreply.github.com> Date: Tue, 3 Aug 2021 21:15:34 +0200 Subject: [PATCH] [enh] Add Petalsearch.com engine (xpath) (#2897) * [enh] Add Petalsearch.com engine (xpath) Upstream example query: https://petalsearch.com/search?query=Felis%20lynx%20Linnaeus&sregion=de&pn=1 * Fix Petalsearch title_xpath Fixes the title_xpath from Petalsearch which got changed in the meantime. --- searx/settings.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/searx/settings.yml b/searx/settings.yml index 4a4dd4c3..cc51d6f7 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -1377,6 +1377,24 @@ engines: require_api_key: false results: html + shortcut : petal + engine : xpath + paging : True + search_url : https://petalsearch.com/search?query={query}&pn={pageno} + title_xpath : //div[@class="card-title"]/span + url_xpath : //a[@class="card-main"]/@href + content_xpath : //div[@class="webpage-text"] + page_size : 12 + categories : general + timeout : 4.0 + disabled : True + about: + website: https://petalsearch.com + wikidata_id: # + use_official_api: false + require_api_key: false + results: HTML + - name : ask shortcut : ask engine : xpath