mirror of
https://github.com/searxng/searxng.git
synced 2026-06-11 04:17:50 +02:00
[feat] engines: add duckduckgo web engine as alternative to html.duckduckgo.com
html.duckduckgo.com captchas all my IPs very fast. I figured out that using duckduckgo.com works even if html.duckduckgo.com is captcha-ed, hence adding support for duckduckgo.com's general web search here. This implementation fetches the link to the first API page (i.e. ``links.duckduckgo.com/d.js?...``) from duckduckgo.com and uses the ``n`` parameter of the API to fetch all subsequent pages. This also means that it's not possible to immediately search for the third page - the first and the second page would need to be loaded first. The reason why we can't just normally use the `vqd` value is that the API URLs require an additional parameter `dp` which seems generated at server-side, so we can't build it ourselves and must scrape it from the HTML pages.
This commit is contained in:
@@ -803,10 +803,17 @@ engines:
|
||||
display_type: ["infobox"]
|
||||
categories: [general]
|
||||
|
||||
# duckduckgo uses html.duckduckgo.com,
|
||||
# duckduckgo web uses duckduckgo.com
|
||||
- name: duckduckgo
|
||||
engine: duckduckgo
|
||||
shortcut: ddg
|
||||
|
||||
- name: duckduckgo web
|
||||
engine: duckduckgo_web
|
||||
shortcut: ddgw
|
||||
disabled: true
|
||||
|
||||
- name: duckduckgo images
|
||||
engine: duckduckgo_extra
|
||||
categories: [images]
|
||||
|
||||
Reference in New Issue
Block a user