diff options
| author | Quentin Aristote <quentin@aristote.fr> | 2022-12-20 22:29:23 +0100 |
|---|---|---|
| committer | Quentin Aristote <quentin@aristote.fr> | 2022-12-20 22:29:23 +0100 |
| commit | 9bde3c4624eb916bafcf9a18792edb42e3a25a17 (patch) | |
| tree | 6be5b29d81fedf5086eb101f6cd9c35b0e14c36e | |
| parent | e09b2af5fecdfad696ce58436df5076328759c0a (diff) | |
searx: engines: wikipedia: fix xpath and test
| -rw-r--r-- | config/services/web/searx/searx/engines.nix | 6 | ||||
| -rwxr-xr-x | tests/run-tests.sh | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/config/services/web/searx/searx/engines.nix b/config/services/web/searx/searx/engines.nix index 76f0ca8..5256c27 100644 --- a/config/services/web/searx/searx/engines.nix +++ b/config/services/web/searx/searx/engines.nix @@ -29,9 +29,9 @@ let extraParameters = { fulltext = 1; }; }; results_xpath = ''//ul[@class="mw-search-results"]/li''; - url_xpath = ''./div[@class="mw-search-result-heading"]/a/@href''; - title_xpath = ''./div[@class="mw-search-result-heading"]/a''; - content_xpath = ''./div[@class="searchresult"]''; + url_xpath = ''.//div[@class="mw-search-result-heading"]/a/@href''; + title_xpath = ''.//div[@class="mw-search-result-heading"]/a/@title''; + content_xpath = ''.//div[@class="searchresult"]''; shortcut = "w${lang}"; categories = "general"; disabled = true; diff --git a/tests/run-tests.sh b/tests/run-tests.sh index 7842dc6..705f28d 100755 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -43,8 +43,8 @@ echo Checking custom Searx engines : declare -A QUERIES QUERIES[alternativeto]=Searx QUERIES[nlab]='Kan%20extension' -QUERIES[wikipediafr]=Paris -QUERIES[wikipediaen]=Paris +QUERIES[wfr]=Paris +QUERIES[wen]=Paris for ENGINE in "${!QUERIES[@]}" do echo Checking engine $ENGINE ... |
