summaryrefslogtreecommitdiff
path: root/searx/engines/google_scholar.py
diff options
context:
space:
mode:
Diffstat (limited to 'searx/engines/google_scholar.py')
-rw-r--r--searx/engines/google_scholar.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/searx/engines/google_scholar.py b/searx/engines/google_scholar.py
index 706291da7..3563656f4 100644
--- a/searx/engines/google_scholar.py
+++ b/searx/engines/google_scholar.py
@@ -27,7 +27,7 @@ import typing as t
from urllib.parse import urlencode
from datetime import datetime
from lxml import html
-import httpx
+from curl_cffi.requests.exceptions import TooManyRedirects
from searx.utils import (
eval_xpath,
@@ -63,6 +63,7 @@ about = {
# engine dependent config
categories = ["science", "scientific publications"]
paging = True
+enable_http3 = True
max_page = 50
"""`Google max 50 pages`_
@@ -102,7 +103,7 @@ def response(resp: "SXNG_Response") -> EngineResults: # pylint: disable=too-man
raise SearxEngineAccessDeniedException(
message="google_scholar: unusual traffic detected",
)
- raise httpx.TooManyRedirects(f"location {resp.headers['Location'].split('?')[0]}")
+ raise TooManyRedirects(f"location {resp.headers['Location'].split('?')[0]}")
res = EngineResults()
dom = html.fromstring(resp.text)