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-20.04]
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Brotli~=1.0.9
Brotli~=1.1
babel~=2.15
certifi~=2024.7.4
certifi~=2024.8.30
flask-babel~=4.0
flask~=3.0
jinja2~=3.1
langdetect~=1.0.9
lxml~=4.9
lxml~=5.3
lxml_html_clean~=0.4
pygments~=2.18
python-dateutil~=2.9
Expand Down
20 changes: 10 additions & 10 deletions searx/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ engines:
engine : wikipedia
shortcut : wp
base_url : 'https://{language}.wikipedia.org/'
disabled : True

#The fulltext and title parameter is necessary for Wikimini because sometimes it will not show the results and redirect instead
- name: wikimini
Expand Down Expand Up @@ -347,7 +348,6 @@ engines:
engine : duckduckgo_definitions
shortcut : ddd
weight : 2
disabled : True
tests: *tests_infobox

# cloudflare protected
Expand Down Expand Up @@ -578,12 +578,14 @@ engines:
engine : google
shortcut : go
use_mobile_ui: false
disabled : True
# additional_tests:
# android: *test_android

- name : google images
engine : google_images
shortcut : goi
disabled : True
# additional_tests:
# android: *test_android
# dali:
Expand All @@ -596,18 +598,21 @@ engines:
- name : google news
engine : google_news
shortcut : gon
disabled : True
# additional_tests:
# android: *test_android

- name : google videos
engine : google_videos
shortcut : gov
disabled : True
# additional_tests:
# android: *test_android

- name : google scholar
engine : google_scholar
shortcut : gos
disabled : True

- name : google play apps
engine : xpath
Expand Down Expand Up @@ -1112,6 +1117,7 @@ engines:
- name : soundcloud
engine : soundcloud
shortcut : sc
disabled : True

- name: stackoverflow
engine: stackexchange
Expand Down Expand Up @@ -1259,28 +1265,21 @@ engines:
- name : yahoo
engine : yahoo
shortcut : yh
disabled : True

- name : yahoo news
engine : yahoo_news
shortcut : yhn

- name : youtube
shortcut : yt
disabled : True
# You can use the engine using the official stable API, but you need an API key
# See : https://console.developers.google.com/project
# engine : youtube_api
# api_key: 'apikey' # required!
# Or you can use the html non-stable engine, activated by default
engine : youtube_noapi

- name : yggtorrent
engine : yggtorrent
shortcut : ygg
url: https://www4.yggtorrent.li/
disabled : True
timeout : 4.0

- name : dailymotion
engine : dailymotion
shortcut : dm
Expand Down Expand Up @@ -1399,6 +1398,7 @@ engines:
- name : dictzone
engine : dictzone
shortcut : dc
disabled : True

- name : mymemory translated
engine : translated
Expand Down Expand Up @@ -1446,7 +1446,6 @@ engines:
suggestion_xpath : /html/body//div[@class="top-info"]/p[@class="top-info spell"]/a
first_page_num : 0
page_size : 10
disabled : True
about:
website: https://www.mojeek.com/
wikidata_id: Q60747299
Expand Down Expand Up @@ -1660,6 +1659,7 @@ engines:
shortcut: brave
engine: xpath
paging: true
disabled : True
first_page_num: 0
search_url: https://search.brave.com/search?q={query}&offset={pageno}&spellcheck=1
url_xpath: //a[@class="result-header"]/@href
Expand Down
4 changes: 2 additions & 2 deletions searx/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from urllib.parse import urljoin, urlparse, urlunparse

from lxml import html
from lxml.etree import ElementBase, XPath, XPathError, XPathSyntaxError, _ElementStringResult, _ElementUnicodeResult
from lxml.etree import ElementBase, XPath, XPathError, XPathSyntaxError, _ElementUnicodeResult
from babel.core import get_global


Expand Down Expand Up @@ -154,7 +154,7 @@ def extract_text(xpath_results, allow_none=False):
)
text = text.strip().replace('\n', ' ')
return ' '.join(text.split())
elif isinstance(xpath_results, (_ElementStringResult, _ElementUnicodeResult, str, Number, bool)):
elif isinstance(xpath_results, (_ElementUnicodeResult, str, Number, bool)):
return str(xpath_results)
elif xpath_results is None and allow_none:
return None
Expand Down
Loading