Unverified Commit 5c9b5be1 authored by Clément's avatar Clément
Browse files

python3Packages.ddgs: 9.6.1 -> 9.10.0

parent 9191d8c5
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -7,19 +7,20 @@
  lxml,
  httpx,
  h2,
  fake-useragent,
  versionCheckHook,
}:

buildPythonPackage rec {
  pname = "ddgs";
  version = "9.6.1";
  version = "9.10.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "deedy5";
    repo = "ddgs";
    tag = "v${version}";
    hash = "sha256-NaOwklHea3TUDa2M23X549IiX5zP87N9qWKkr5PObLY=";
    hash = "sha256-NNXGvDGynu6QtVqxVr74b/qehQ7qhq1NiVxyuKw2C4w=";
  };

  patches = [
@@ -42,6 +43,7 @@ buildPythonPackage rec {
    lxml
    httpx
    h2
    fake-useragent
  ]
  ++ httpx.optional-dependencies.http2
  ++ httpx.optional-dependencies.socks
+8 −8
Original line number Diff line number Diff line
diff --git a/ddgs/base.py b/ddgs/base.py
index e964511..34d1c4f 100644
index 11111acc7a..b71ee337d9 100644
--- a/ddgs/base.py
+++ b/ddgs/base.py
@@ -11,7 +11,7 @@ from typing import Any, Generic, Literal, TypeVar
@@ -9,7 +9,7 @@
 from lxml import html
 from lxml.etree import HTMLParser as LHTMLParser
 
@@ -12,10 +12,10 @@ index e964511..34d1c4f 100644
 
 logger = logging.getLogger(__name__)
diff --git a/ddgs/cli.py b/ddgs/cli.py
index d295f77..38adb71 100644
index 36cf2f373c..7cf0b2f35d 100644
--- a/ddgs/cli.py
+++ b/ddgs/cli.py
@@ -12,11 +12,11 @@ from typing import Any
@@ -9,11 +9,11 @@
 from urllib.parse import unquote
 
 import click
@@ -23,17 +23,17 @@ index d295f77..38adb71 100644
 
 from . import __version__
 from .ddgs import DDGS
 from .utils import _expand_proxy_tb_alias, json_dumps
 from .utils import _expand_proxy_tb_alias
+from .http_client2 import HttpClient2
 
 logger = logging.getLogger(__name__)
 
@@ -101,7 +101,7 @@ def _sanitize_query(query: str) -> str:
@@ -103,7 +103,7 @@
 
 def _download_file(url: str, dir_path: str, filename: str, proxy: str | None, verify: bool) -> None:
 def _download_file(url: str, dir_path: str, filename: str, proxy: str | None, *, verify: bool) -> None:
     try:
-        resp = primp.Client(proxy=proxy, impersonate="random", impersonate_os="random", timeout=10, verify=verify).get(
+        resp = HttpClient2(proxy=proxy, timeout=10, verify=verify).get(
             url
             url,
         )
         if resp.status_code == 200: