Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6255b33c authored by Adam Tauber's avatar Adam Tauber
Browse files

[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
parent 45f0e1a8
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -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