.github/workflows/data-update.yml+1−1
@@ -29,7 +29,7 @@ jobs:
29 - name: Set up Python
29 - name: Set up Python
30 uses: actions/setup-python@v2
30 uses: actions/setup-python@v2
32− python-version: '3.10'
32+ python-version: '3.9'
33 architecture: 'x64'
33 architecture: 'x64'
35 - name: Install Python dependencies
35 - name: Install Python dependencies
.github/workflows/integration.yml+3−32
@@ -13,7 +13,7 @@ jobs:
15 os: [ubuntu-20.04]
15 os: [ubuntu-20.04]
16− python-version: [3.7, 3.8, 3.9, "3.10"]
16+ python-version: [3.6, 3.7, 3.8, 3.9]
18 - name: Checkout
18 - name: Checkout
19 uses: actions/checkout@v2
19 uses: actions/checkout@v2
@@ -56,17 +56,6 @@ jobs:
56 uses: actions/checkout@v2
56 uses: actions/checkout@v2
57 - name: Install Ubuntu packages
57 - name: Install Ubuntu packages
58 run: sudo ./utils/searx.sh install packages
58 run: sudo ./utils/searx.sh install packages
59− - name: Set up Python
60− uses: actions/setup-python@v2
62− python-version: '3.9'
64− - name: Cache Python dependencies
66− uses: actions/cache@v2
69− key: python-ubuntu-20.04-3.9-${{ hashFiles('requirements*.txt', 'setup.py') }}
70 - name: Install node dependencies
59 - name: Install node dependencies
71 run: make V=1 node.env
60 run: make V=1 node.env
72 - name: Build themes
61 - name: Build themes
@@ -79,21 +68,14 @@ jobs:
79 - name: Checkout
68 - name: Checkout
80 uses: actions/checkout@v2
69 uses: actions/checkout@v2
83 persist-credentials: false
71 persist-credentials: false
84 - name: Install Ubuntu packages
72 - name: Install Ubuntu packages
85 run: sudo ./utils/searx.sh install buildhost
73 run: sudo ./utils/searx.sh install buildhost
86 - name: Set up Python
74 - name: Set up Python
87 uses: actions/setup-python@v2
75 uses: actions/setup-python@v2
89− python-version: '3.10'
77+ python-version: '3.9'
90 architecture: 'x64'
78 architecture: 'x64'
91− - name: Cache Python dependencies
93− uses: actions/cache@v2
96− key: python-ubuntu-20.04-3.9-${{ hashFiles('requirements*.txt', 'setup.py') }}
97 - name: Build documentation
79 - name: Build documentation
99 make V=1 docs.clean docs.html
81 make V=1 docs.clean docs.html
@@ -115,7 +97,7 @@ jobs:
115 - documentation
97 - documentation
117 DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
99 DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
118− runs-on: ubuntu-20.04
100+ runs-on: ubuntu-18.04
120 - name: Checkout
102 - name: Checkout
121 if: env.DOCKERHUB_USERNAME != null
103 if: env.DOCKERHUB_USERNAME != null
@@ -123,17 +105,6 @@ jobs:
124 # make sure "make docker.push" can get the git history
106 # make sure "make docker.push" can get the git history
125 fetch-depth: '0'
107 fetch-depth: '0'
126− - name: Set up Python
127− uses: actions/setup-python@v2
129− python-version: '3.9'
131− - name: Cache Python dependencies
133− uses: actions/cache@v2
136− key: python-ubuntu-20.04-3.9-${{ hashFiles('requirements*.txt', 'setup.py') }}
137 - name: Set up QEMU
108 - name: Set up QEMU
138 if: env.DOCKERHUB_USERNAME != null
109 if: env.DOCKERHUB_USERNAME != null
139 uses: docker/setup-qemu-action@v1
110 uses: docker/setup-qemu-action@v1
@@ -26,5 +26,3 @@ dist/
28searx.egg-info/
28searx.egg-info/
@@ -59,7 +59,7 @@ confidence=
59# --enable=similarities". If you want to run only the classes checker, but have
59# --enable=similarities". If you want to run only the classes checker, but have
60# no Warning level messages displayed, use"--disable=all --enable=classes
60# no Warning level messages displayed, use"--disable=all --enable=classes
61# --disable=W"
61# --disable=W"
62−disable=bad-whitespace, duplicate-code, consider-using-f-string
62+disable=bad-whitespace, duplicate-code
64# Enable the message, report, category or checker with the given id(s). You can
64# Enable the message, report, category or checker with the given id(s). You can
65# either give multiple identifier separated by comma (,) or put this option
65# either give multiple identifier separated by comma (,) or put this option
@@ -165,4 +165,3 @@ generally made searx better:
165- @jhigginbotham
165- @jhigginbotham
167- @OliveiraHermogenes
167- @OliveiraHermogenes
168−- Paul Alcock @Guilvareux
@@ -1,4 +1,4 @@
1−FROM alpine:3.15
1+FROM alpine:3.12
2ENTRYPOINT ["/sbin/tini","--","/usr/local/searx/dockerfiles/docker-entrypoint.sh"]
2ENTRYPOINT ["/sbin/tini","--","/usr/local/searx/dockerfiles/docker-entrypoint.sh"]
4VOLUME /etc/searx
4VOLUME /etc/searx
@@ -46,19 +46,18 @@ RUN apk upgrade --no-cache \
47 uwsgi-python3 \
47 uwsgi-python3 \
49− && pip3 install --upgrade pip wheel setuptools \
49+ && pip3 install --upgrade pip \
50 && pip3 install --no-cache -r requirements.txt \
50 && pip3 install --no-cache -r requirements.txt \
51 && apk del build-dependencies \
51 && apk del build-dependencies \
52 && rm -rf /root/.cache
52 && rm -rf /root/.cache
54−COPY searx ./searx
54+COPY --chown=searx:searx . .
55−COPY dockerfiles ./dockerfiles
57ARG TIMESTAMP_SETTINGS=0
56ARG TIMESTAMP_SETTINGS=0
58ARG TIMESTAMP_UWSGI=0
57ARG TIMESTAMP_UWSGI=0
59ARG VERSION_GITCOMMIT=unknown
58ARG VERSION_GITCOMMIT=unknown
61−RUN /usr/bin/python3 -m compileall -q searx; \
60+RUN su searx -c "/usr/bin/python3 -m compileall -q searx"; \
62 touch -c --date=@${TIMESTAMP_SETTINGS} searx/settings.yml; \
61 touch -c --date=@${TIMESTAMP_SETTINGS} searx/settings.yml; \
63 touch -c --date=@${TIMESTAMP_UWSGI} dockerfiles/uwsgi.ini; \
62 touch -c --date=@${TIMESTAMP_UWSGI} dockerfiles/uwsgi.ini; \
64 if [ ! -z $VERSION_GITCOMMIT ]; then\
63 if [ ! -z $VERSION_GITCOMMIT ]; then\
@@ -61,7 +61,7 @@ our homepage_.
61.. _homepage: https://searx.github.io/searx
61.. _homepage: https://searx.github.io/searx
64− openhub_ // twitter_ // IRC: #searx @ Libera (irc.libera.chat)
64+ openhub_ // twitter_ // IRC: #searx @ freenode
66.. _openhub: https://www.openhub.net/p/searx
66.. _openhub: https://www.openhub.net/p/searx
67.. _twitter: https://twitter.com/Searx_engine
67.. _twitter: https://twitter.com/Searx_engine
@@ -3,14 +3,14 @@ Blog
5.. toctree::
5.. toctree::
6− :titlesonly:
6+ :maxdepth: 2
7− :reversed:
7+ :caption: Contents
11 intro-offline
12 intro-offline
12 private-engines
13 private-engines
14 command-line-engines
14 command-line-engines
15 search-indexer-engines
15 search-indexer-engines
16 sql-engines
16 sql-engines
@@ -10,7 +10,7 @@ from searx.version import VERSION_STRING
10# Project --------------------------------------------------------------
10# Project --------------------------------------------------------------
12project = u'searx'
12project = u'searx'
13−copyright = u'2015-2021, Adam Tauber, Noémi Ványi'
13+copyright = u'2015-2020, Adam Tauber, Noémi Ványi'
14author = u'Adam Tauber'
14author = u'Adam Tauber'
15release, version = VERSION_STRING, VERSION_STRING
15release, version = VERSION_STRING, VERSION_STRING
16highlight_language = 'none'
16highlight_language = 'none'
@@ -101,7 +101,6 @@ imgmath_font_size = 14
102html_theme_options = {"index_sidebar_logo": True}
102html_theme_options = {"index_sidebar_logo": True}
103html_context = {"project_links": [] }
103html_context = {"project_links": [] }
104−html_context["project_links"].append(ProjectLink("Blog", "blog/index.html"))
105if brand.GIT_URL:
104if brand.GIT_URL:
106 html_context["project_links"].append(ProjectLink("Source", brand.GIT_URL))
105 html_context["project_links"].append(ProjectLink("Source", brand.GIT_URL))
107if brand.WIKI_URL:
106if brand.WIKI_URL:
docs/dev/engine_overview.rst+1−1
@@ -171,7 +171,7 @@ headers set HTTP header information
171data set HTTP data information
171data set HTTP data information
172cookies set HTTP cookies
172cookies set HTTP cookies
173verify bool Performing SSL-Validity check
173verify bool Performing SSL-Validity check
174−follow_redirects bool Follow redirects
174+allow_redirects bool Follow redirects
175max_redirects int maximum redirects, hard limit
175max_redirects int maximum redirects, hard limit
176soft_max_redirects int maximum redirects, soft limit. Record an error but don't stop the engine
176soft_max_redirects int maximum redirects, soft limit. Record an error but don't stop the engine
177raise_for_httperror bool True by default: raise an exception if the HTTP code of response is >= 300
177raise_for_httperror bool True by default: raise an exception if the HTTP code of response is >= 300
@@ -13,7 +13,7 @@ source_dot_config
14PY_SETUP_EXTRAS='[test]'
14PY_SETUP_EXTRAS='[test]'
15NPM_PACKAGES="less@2.7 less-plugin-clean-css grunt-cli"
15NPM_PACKAGES="less@2.7 less-plugin-clean-css grunt-cli"
16−GECKODRIVER_VERSION="v0.30.0"
16+GECKODRIVER_VERSION="v0.28.0"
17# SPHINXOPTS=
17# SPHINXOPTS=
19# These py files are linted by test.pylint(), all other files are linted by
19# These py files are linted by test.pylint(), all other files are linted by
@@ -224,7 +224,7 @@ docker.build() {
225 # build Docker image
225 # build Docker image
226 build_msg DOCKER "Building image ${SEARX_IMAGE_NAME}:${SEARX_GIT_VERSION}"
226 build_msg DOCKER "Building image ${SEARX_IMAGE_NAME}:${SEARX_GIT_VERSION}"
227− docker build \
227+ sudo docker build \
228 --build-arg GIT_URL="${GIT_URL}" \
228 --build-arg GIT_URL="${GIT_URL}" \
229 --build-arg SEARX_GIT_VERSION="${SEARX_GIT_VERSION}" \
229 --build-arg SEARX_GIT_VERSION="${SEARX_GIT_VERSION}" \
230 --build-arg VERSION_GITCOMMIT="${VERSION_GITCOMMIT}" \
230 --build-arg VERSION_GITCOMMIT="${VERSION_GITCOMMIT}" \
@@ -236,8 +236,8 @@ docker.build() {
236 -t "${SEARX_IMAGE_NAME}:latest" -t "${SEARX_IMAGE_NAME}:${SEARX_GIT_VERSION}" .
236 -t "${SEARX_IMAGE_NAME}:latest" -t "${SEARX_IMAGE_NAME}:${SEARX_GIT_VERSION}" .
238 if [ "$1" = "push" ]; then
238 if [ "$1" = "push" ]; then
239− docker push "${SEARX_IMAGE_NAME}:latest"
239+ sudo docker push "${SEARX_IMAGE_NAME}:latest"
240− docker push "${SEARX_IMAGE_NAME}:${SEARX_GIT_VERSION}"
240+ sudo docker push "${SEARX_IMAGE_NAME}:${SEARX_GIT_VERSION}"
243 dump_return $?
243 dump_return $?
requirements-dev.txt+12−13
@@ -1,20 +1,19 @@
2nose2[coverage_plugin]==0.10.0
2nose2[coverage_plugin]==0.10.0
3cov-core==1.15.0
3cov-core==1.15.0
4−pycodestyle==2.8.0
4+pycodestyle==2.7.0
5−pylint==2.12.2
5+pylint==2.10.2
6−splinter==0.17.0
6+splinter==0.15.0
7−transifex-client==0.14.3; python_version < '3.10'
7+transifex-client==0.14.3
8−transifex-client==0.12.1; python_version == '3.10'
9−selenium==4.1.0
8+selenium==3.141.0
10−twine==3.7.1
9+twine==3.4.2
11−Pallets-Sphinx-Themes==2.0.2
10+Pallets-Sphinx-Themes==2.0.1
12docutils==0.16
11docutils==0.16
13−Sphinx==4.4.0
12+Sphinx==4.1.2
14−sphinx-issues==3.0.1
13+sphinx-issues==1.2.0
15−sphinx-jinja==1.4.0
14+sphinx-jinja==1.1.1
16sphinx-tabs==3.2.0
15sphinx-tabs==3.2.0
17sphinxcontrib-programoutput==0.17
16sphinxcontrib-programoutput==0.17
18sphinx-autobuild==2021.3.14
17sphinx-autobuild==2021.3.14
19−linuxdoc==20211220
18+linuxdoc==20210324
20−aiounittest==1.4.1
19+aiounittest==1.4.0
@@ -1,16 +1,16 @@
1−certifi==2021.10.8
1+certifi==2021.5.30
2babel==2.9.1
2babel==2.9.1
3flask-babel==2.0.0
3flask-babel==2.0.0
4−flask==2.0.2
4+flask==1.1.2
5−jinja2==3.0.3
5+jinja2==3.0.1
6−lxml==4.7.1
6+lxml==4.6.3
7pygments==2.8.0
7pygments==2.8.0
8python-dateutil==2.8.2
8python-dateutil==2.8.2
9−pyyaml==6.0
9+pyyaml==5.4.1
10−httpx[http2]==0.21.3
10+httpx[http2]==0.19.0
11Brotli==1.0.9
11Brotli==1.0.9
12uvloop==0.16.0; python_version >= '3.7'
12uvloop==0.16.0; python_version >= '3.7'
13uvloop==0.14.0; python_version < '3.7'
13uvloop==0.14.0; python_version < '3.7'
14−httpx-socks[asyncio]==0.7.2
14+httpx-socks[asyncio]==0.3.1
15langdetect==1.0.9
15langdetect==1.0.9
16setproctitle==1.2.2
16setproctitle==1.2.2
searx/autocomplete.py+7−24
@@ -24,7 +24,6 @@ from httpx import HTTPError
26from searx import settings
26from searx import settings
27−from searx.data import ENGINES_LANGUAGES
28from searx.network import get as http_get
27from searx.network import get as http_get
29from searx.exceptions import SearxEngineResponseException
28from searx.exceptions import SearxEngineResponseException
@@ -36,22 +35,6 @@ def get(*args, **kwargs):
36 return http_get(*args, **kwargs)
35 return http_get(*args, **kwargs)
39−def brave(query, lang):
40− # brave search autocompleter
41− url = 'https://search.brave.com/api/suggest?{query}'
43− resp = get(url.format(query=urlencode({'q': query})))
48− data = loads(resp.text)
49− for suggestion in data[1]:
50− results.append(suggestion)
55def dbpedia(query, lang):
38def dbpedia(query, lang):
56 # dbpedia autocompleter, no HTTPS
39 # dbpedia autocompleter, no HTTPS
57 autocomplete_url = 'https://lookup.dbpedia.org/api/search.asmx/KeywordSearch?'
40 autocomplete_url = 'https://lookup.dbpedia.org/api/search.asmx/KeywordSearch?'
@@ -94,11 +77,12 @@ def google(query, lang):
95def startpage(query, lang):
78def startpage(query, lang):
96 # startpage autocompleter
79 # startpage autocompleter
97− lui = ENGINES_LANGUAGES['startpage'].get(lang, 'english')
98− url = 'https://startpage.com/suggestions?{query}'
80+ url = 'https://startpage.com/do/suggest?{query}'
99− resp = get(url.format(query=urlencode({'q': query, 'segment': 'startpage.udog', 'lui': lui})))
82+ resp = get(url.format(query=urlencode({'query': query}))).text.split('\n')
100− data = resp.json()
83+ if len(resp) > 1:
101− return [e['text'] for e in data.get('suggestions', []) if 'text' in e]
84+ return resp
104def swisscows(query, lang):
88def swisscows(query, lang):
@@ -136,8 +120,7 @@ def wikipedia(query, lang):
136 return []
120 return []
139−backends = {'brave': brave,
140− 'dbpedia': dbpedia,
123+backends = {'dbpedia': dbpedia,
141 'duckduckgo': duckduckgo,
124 'duckduckgo': duckduckgo,
142 'google': google,
125 'google': google,
143 'startpage': startpage,
126 'startpage': startpage,
searx/data/__init__.py+14−39
@@ -1,50 +1,25 @@
1−# SPDX-License-Identifier: AGPL-3.0-or-later
3−"""This module holds the *data* created by::
17− 'ahmia_blacklist_loader',
20import json
1import json
21from pathlib import Path
2from pathlib import Path
5+__init__ = ['ENGINES_LANGUGAGES', 'CURRENCIES', 'USER_AGENTS', 'EXTERNAL_URLS', 'WIKIDATA_UNITS', 'EXTERNAL_BANGS',
6+ 'bangs_loader', 'ahmia_blacklist_loader']
23data_dir = Path(__file__).parent
7data_dir = Path(__file__).parent
26−def _load(filename):
10+def load(filename):
27− with open(data_dir / filename, encoding='utf-8') as f:
11+ with open(data_dir / filename, encoding='utf-8') as fd:
28− return json.load(f)
12+ return json.load(fd)
31def ahmia_blacklist_loader():
15def ahmia_blacklist_loader():
32− """Load data from `ahmia_blacklist.txt` and return a list of MD5 values of onion
33− names. The MD5 values are fetched by::
35− searx_extra/update/update_ahmia_blacklist.py
37− This function is used by :py:mod:`searx.plugins.ahmia_filter`.
40− with open(str(data_dir / 'ahmia_blacklist.txt'), encoding='utf-8') as f:
16+ with open(str(data_dir / 'ahmia_blacklist.txt'), encoding='utf-8') as fd:
41− return f.read().split()
17+ return fd.read().split()
44−ENGINES_LANGUAGES = _load('engines_languages.json')
20+ENGINES_LANGUAGES = load('engines_languages.json')
45−CURRENCIES = _load('currencies.json')
21+CURRENCIES = load('currencies.json')
46−USER_AGENTS = _load('useragents.json')
22+USER_AGENTS = load('useragents.json')
47−EXTERNAL_URLS = _load('external_urls.json')
23+EXTERNAL_URLS = load('external_urls.json')
48−WIKIDATA_UNITS = _load('wikidata_units.json')
24+WIKIDATA_UNITS = load('wikidata_units.json')
49−EXTERNAL_BANGS = _load('external_bangs.json')
25+EXTERNAL_BANGS = load('external_bangs.json')
50−OSM_KEYS_TAGS = _load('osm_keys_tags.json')
searx/data/ahmia_blacklist.txt−8485
This diff is too big to show here.
searx/data/currencies.json+72−37
This diff is too big to show here.
searx/data/engines_languages.json+23−60
This diff is too big to show here.
searx/data/external_bangs.json+5825−5826
This diff is too big to show here.
searx/data/osm_keys_tags.jsondeleted−15416
This diff is too big to show here.
searx/data/useragents.json+3−4
This diff is too big to show here.
searx/data/wikidata_units.json+5−33
This diff is too big to show here.
searx/engines/__init__.py+3−3
This diff is too big to show here.
searx/engines/command.py+1−1
This diff is too big to show here.
searx/engines/duckduckgo.py+47−96
This diff is too big to show here.
searx/engines/gigablast.py+13−24
This diff is too big to show here.
searx/engines/google.py+13−22
This diff is too big to show here.
searx/engines/imdb.pydeleted−55
This diff is too big to show here.
searx/engines/invidious.py+2−2
This diff is too big to show here.
searx/engines/mysql_server.py−2
This diff is too big to show here.
searx/engines/onesearch.pydeleted−57
This diff is too big to show here.
searx/engines/openstreetmap.py+67−397
This diff is too big to show here.
searx/engines/prowlarr.pydeleted−80
This diff is too big to show here.
searx/engines/qwant.py+69−175
This diff is too big to show here.
searx/engines/rumble.py+1−1
This diff is too big to show here.
searx/engines/stackexchange.pydeleted−67
This diff is too big to show here.
searx/engines/stackoverflow.pynew file+64
This diff is too big to show here.
searx/engines/startpage.py+20−100
This diff is too big to show here.
searx/engines/tineye.pydeleted−86
This diff is too big to show here.
searx/engines/xpath.py+1−1
This diff is too big to show here.
searx/engines/xpath_flex.pydeleted−121
This diff is too big to show here.
searx/engines/yahoo.py+91−93
This diff is too big to show here.
searx/engines/yggtorrent.py+2−2
This diff is too big to show here.
searx/external_urls.py+2−14
This diff is too big to show here.
searx/network/__init__.py+29−28
This diff is too big to show here.
searx/network/client.py+51−42
This diff is too big to show here.
searx/network/network.py+16−71
This diff is too big to show here.
searx/plugins/self_info.py+1−1
This diff is too big to show here.
searx/plugins/tracker_url_remover.py+1−1
This diff is too big to show here.
This diff is too big to show here.
searx/search/__init__.py+2−5
This diff is too big to show here.
searx/search/checker/impl.py+1−1
This diff is too big to show here.
searx/search/processors/online.py+3−4
This diff is too big to show here.
searx/settings.yml+40−146
This diff is too big to show here.
searx/settings_loader.py+2−2
This diff is too big to show here.
searx/static/themes/oscar/css/logicodev-dark.css−2
This diff is too big to show here.
searx/static/themes/oscar/css/logicodev-dark.min.css+1−1
This diff is too big to show here.
searx/static/themes/oscar/css/logicodev-dark.min.css.map+1−1
This diff is too big to show here.
searx/static/themes/oscar/css/logicodev.css−2
This diff is too big to show here.
searx/static/themes/oscar/css/logicodev.min.css+1−1
This diff is too big to show here.
searx/static/themes/oscar/css/logicodev.min.css.map+1−1
This diff is too big to show here.
searx/static/themes/oscar/js/searx.js+83
This diff is too big to show here.
searx/static/themes/oscar/src/js/leaflet_map.js+83
This diff is too big to show here.
searx/static/themes/oscar/src/less/logicodev/results.less−30
This diff is too big to show here.
searx/static/themes/oscar/src/less/logicodev/search.less−2
This diff is too big to show here.
searx/static/themes/simple/js/searx.js+87
This diff is too big to show here.
searx/static/themes/simple/js/searx_src/searx_mapresult.js+87
This diff is too big to show here.
searx/static/themes/simple/less/style.less−32
This diff is too big to show here.
searx/templates/oscar/result_templates/map.html+48−52
This diff is too big to show here.
searx/templates/oscar/result_templates/products.html+1−2
This diff is too big to show here.
searx/templates/simple/result_templates/map.html+52−35
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
searx_extra/update/update_osm_keys_tags.pydeleted−209
This diff is too big to show here.
tests/unit/network/test_network.py+10−10
This diff is too big to show here.
tests/unit/test_external_bangs.py+6
This diff is too big to show here.
tests/unit/test_results.py+4−4
This diff is too big to show here.
tests/unit/test_webapp.py−5
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.