diff options
author | Adam Tauber <asciimoo@gmail.com> | 2021-03-25 01:13:24 +0100 |
---|---|---|
committer | Adam Tauber <asciimoo@gmail.com> | 2021-03-25 01:13:24 +0100 |
commit | 6255b33c9dcf0d28f0a3307af988565f69259ce2 (patch) | |
tree | 676b13d17c9c2704fd2730ce2721c67f08dfba35 | |
parent | 45f0e1a859fa12ce2ae0c24dc356922fcad50c8d (diff) | |
download | searxng-6255b33c9dcf0d28f0a3307af988565f69259ce2.tar.gz searxng-6255b33c9dcf0d28f0a3307af988565f69259ce2.zip |
[fix] rewrite hoogle to use html/xpath instead of json
the json response has been changed and it contains html chunks which is
not compatible with our json engine, so we have to switch to html/xpath
parsing
-rw-r--r-- | searx/settings.yml | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/searx/settings.yml b/searx/settings.yml index 4d68e476b..15609b756 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -618,13 +618,13 @@ engines: results: HTML - name : hoogle - engine : json_engine + engine : xpath paging : True - search_url : https://www.haskell.org/hoogle/?mode=json&hoogle={query}&start={pageno} - results_query : results - url_query : location - title_query : self - content_query : docs + search_url : https://hoogle.haskell.org/?hoogle={query}&start={pageno} + results_xpath : '//div[@class="result"]' + title_xpath : './/div[@class="ans"]//a' + url_xpath : './/div[@class="ans"]//a/@href' + content_xpath : './/div[@class="from"]' page_size : 20 categories : it shortcut : ho |