Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Community-Driven Development: Tracery is developed with input from the community
Requirements
############

Tracery supports Python 3.9+
Tracery supports Python 3.10+

Installation
############
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ pyyaml~=6.0
requests[socks]~=2.32
setproctitle~=1.3
Werkzeug~=3.1
curl_cffi~=0.14
2 changes: 1 addition & 1 deletion searx/engines/yahoo.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def request(query, params):
})

domain = lang2domain.get(lang, '%s.search.yahoo.com' % lang)
params['url'] = 'https://%s/search?%s' % (domain, args)
params['url'] = 'https://%s/search?%s&guccounter=2' % (domain, args)
return params


Expand Down
18 changes: 18 additions & 0 deletions searx/poolrequests.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from threading import local

import requests
from curl_cffi import requests as requests_cffi

from searx import settings
from searx import logger
Expand Down Expand Up @@ -153,6 +154,23 @@ def get_global_proxies():


def request(method, url, **kwargs):
use_curl_cffi = settings.get('search', dict()).get('use_curl_cffi')
if use_curl_cffi:
return _request_cffi(method, url)

return _request(method, url, **kwargs)


def _request_cffi(method, url):
"""Executes the request using curl_cffi."""
session = requests_cffi.Session()
response = session.request(method=method, url=url, impersonate='chrome')
session.close()

return response


def _request(method, url, **kwargs):
"""same as requests/requests/api.py request(...)"""
time_before_request = time()

Expand Down
1 change: 1 addition & 0 deletions searx/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ search:
ban_time_on_fail : 5 # ban time in seconds after engine errors
max_ban_time_on_fail : 120 # max ban time in seconds after engine errors
prefer_configured_language: False # increase weight of results in configured language in ranking
use_curl_cffi : False # whether to use curl_cffi for requests

server:
port : 9000
Expand Down