on master help sign in
[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

commit6255b33c9dcf0d28f0a3307af988565f69259ce2 authorAdam Tauber <asciimoo@gmail.com> dateThu 25 Mar 2021, 01:13 (6 years ago) parent45f0e1a
1 file changed+6−6
searx/settings.yml+6−6
searx/settings.yml+6−6
@@ -618,13 +618,13 @@ engines:
618618 results: HTML
619619
620620 - name : hoogle
621− engine : json_engine
621+ engine : xpath
622622 paging : True
623− search_url : https://www.haskell.org/hoogle/?mode=json&hoogle={query}&start={pageno}
624− results_query : results
625− url_query : location
626− title_query : self
627− content_query : docs
623+ search_url : https://hoogle.haskell.org/?hoogle={query}&start={pageno}
624+ results_xpath : '//div[@class="result"]'
625+ title_xpath : './/div[@class="ans"]//a'
626+ url_xpath : './/div[@class="ans"]//a/@href'
627+ content_xpath : './/div[@class="from"]'
628628 page_size : 20
629629 categories : it
630630 shortcut : ho