2 Commits

Author SHA1 Message Date
Alexandre Flament
82b9e533b2 [fix] static.build: upgrade min. node version to 18.17
For sharp [1] dependency / this commit was cherry picked from PR #3157

[1] https://www.npmjs.com/package/sharp
2025-03-18 06:19:44 +01:00
Bnyro
babbe9e1ae [fix] duckduckgo: show proper source url of answers 2025-03-18 05:31:28 +01:00
2 changed files with 3 additions and 7 deletions

View File

@@ -8,7 +8,7 @@ from __future__ import annotations
from typing import TYPE_CHECKING
import re
from urllib.parse import urlencode, quote_plus
from urllib.parse import quote_plus
import json
import babel
import lxml.html
@@ -397,14 +397,10 @@ def response(resp) -> EngineResults:
and "Your user agent:" not in zero_click
and "URL Decoded:" not in zero_click
):
current_query = resp.search_params["data"].get("q")
results.add(
results.types.Answer(
answer=zero_click,
url="https://duckduckgo.com/?"
+ urlencode(
{"q": current_query},
),
url=extract_text(eval_xpath(doc, '//div[@id="zero_click_abstract"]/a/@href')),
)
)

View File

@@ -4,7 +4,7 @@
declare _Blue
declare _creset
export NODE_MINIMUM_VERSION="16.13.0"
export NODE_MINIMUM_VERSION="18.17.0"
node.help(){
cat <<EOF