repo
stringclasses
454 values
file_path
stringlengths
5
201
extension
stringclasses
1 value
content
stringlengths
8
509k
num_lines
int64
3
16.9k
size_bytes
int64
8
511k
searxng
tests/unit/test_query.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later # pylint: disable=missing-module-docstring,disable=missing-class-docstring,invalid-name from parameterized.parameterized import parameterized from searx.query import RawTextQuery from tests import SearxTestCase class TestQuery(SearxTestCase): def test_simple_query(se...
246
9,070
searxng
tests/unit/engines/test_command.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later # pylint: disable=missing-module-docstring,disable=missing-class-docstring,invalid-name from searx.engines import command as command_engine from searx.result_types import KeyValue from tests import SearxTestCase class TestCommandEngine(SearxTestCase): def test_basic...
219
8,593
searxng
tests/unit/engines/test_xpath.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later # pylint: disable=missing-module-docstring,disable=missing-class-docstring,invalid-name from collections import defaultdict import mock from searx.engines import xpath from searx import logger from tests import SearxTestCase logger = logger.getChild('engines') class Te...
137
5,637
searxng
tests/unit/engines/test_json_engine.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later # pylint: disable=missing-module-docstring from collections import defaultdict import mock from searx.engines import json_engine from searx import logger from tests import SearxTestCase logger = logger.getChild('engines') class TestJsonEngine(SearxTestCase): # pylint:...
255
9,640
searxng
tests/unit/processors/test_online.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later # pylint: disable=missing-module-docstring,disable=missing-class-docstring,invalid-name from searx.search.models import EngineRef, SearchQuery from searx.search.processors import online from searx import engines from tests import SearxTestCase TEST_ENGINE_NAME = "dummy en...
39
1,640
searxng
tests/unit/network/test_network.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later # pylint: disable=missing-module-docstring,disable=missing-class-docstring,invalid-name import httpx from mock import patch from searx.network.network import Network, NETWORKS from tests import SearxTestCase class TestNetwork(SearxTestCase): # pylint: disable=protect...
248
10,712
searxng
searx/external_urls.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later # pylint: disable=missing-module-docstring import math from searx.data import EXTERNAL_URLS IMDB_PREFIX_TO_URL_ID = { 'tt': 'imdb_title', 'mn': 'imdb_name', 'ch': 'imdb_character', 'co': 'imdb_company', 'ev': 'imdb_event', } HTTP_WIKIMEDIA_IMAGE = 'ht...
94
2,688
searxng
searx/valkeydb.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Implementation of the valkey client (valkey-py_). .. _valkey-py: https://github.com/valkey-io/valkey-py This implementation uses the :ref:`settings valkey` setup from ``settings.yml``. A valkey DB connect can be tested by:: >>> from searx import valkeydb >>> valkey...
66
1,868
searxng
searx/brand.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Implementations needed for a branding of SearXNG.""" # pylint: disable=too-few-public-methods # Struct fields aren't discovered in Python 3.14 # - https://github.com/searxng/searxng/issues/5284 from __future__ import annotations __all__ = ["SettingsBrand"] import msgsp...
83
2,854
searxng
searx/limiter.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Bot protection / IP rate limitation. The intention of rate limitation is to limit suspicious requests from an IP. The motivation behind this is the fact that SearXNG passes through requests from bots and is thus classified as a bot itself. As a result, the SearXNG engi...
252
7,567
searxng
searx/locales.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """ SearXNG’s locale data ===================== The variables :py:obj:`RTL_LOCALES` and :py:obj:`LOCALE_NAMES` are loaded from :origin:`searx/data/locales.json` / see :py:obj:`locales_initialize` and :ref:`update_locales.py`. .. hint:: Whenever the value of :py:obj:`AD...
465
15,960
searxng
searx/utils.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Utility functions for the engines""" import time import re import importlib import importlib.util import json import types import typing as t from collections.abc import MutableMapping, Callable from numbers import Number from os.path import splitext, join from random...
814
27,318
searxng
searx/exceptions.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Exception types raised by SearXNG modules.""" import typing as t if t.TYPE_CHECKING: from lxml.etree import XPath class SearxException(Exception): """Base SearXNG exception.""" class SearxParameterException(SearxException): """Raised when query miss a re...
121
4,240
searxng
searx/flaskfix.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later # pylint: disable=missing-module-docstring from urllib.parse import urlparse from werkzeug.serving import WSGIRequestHandler from searx import settings class ReverseProxyPathFix: '''Wrap the application in this middleware and configure the front-end server to ad...
77
2,668
searxng
searx/sqlitedb.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Implementations to make access to SQLite databases a little more convenient. :py:obj:`SQLiteAppl` Abstract class with which DB applications can be implemented. :py:obj:`SQLiteProperties`: Class to manage properties stored in a database. Examplarical implementations...
478
18,379
searxng
searx/valkeylib.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """A collection of convenient functions and valkey/lua scripts. This code was partial inspired by the `Bullet-Proofing Lua Scripts in ValkeyPy`_ article. .. _Bullet-Proofing Lua Scripts in ValkeyPy: https://redis.com/blog/bullet-proofing-lua-scripts-in-redispy/ """ im...
241
7,731
searxng
searx/settings_defaults.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Implementation of the default settings.""" from __future__ import annotations import typing as t import numbers import errno import os import logging from base64 import b64decode from os.path import dirname, abspath import msgspec from typing_extensions import override...
274
10,840
searxng
searx/__init__.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later # pylint: disable=missing-module-docstring, cyclic-import from __future__ import annotations import typing as t import sys import os from os.path import dirname, abspath import logging import msgspec from ._settings import SettingsPref # Debug LOG_FORMAT_DEBUG: str = '%(...
147
4,569
searxng
searx/babel_extract.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """This module implements the :origin:`searxng_msg <babel.cfg>` extractor to extract messages from: - :origin:`searx/searxng.msg` The ``searxng.msg`` files are selected by Babel_, see Babel's configuration in :origin:`babel.cfg`:: searxng_msg = searx.babel_extract.ext...
59
1,828
searxng
searx/wikidata_units.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Unit conversion on the basis of `SPARQL/WIKIDATA Precision, Units and Coordinates`_ .. _SPARQL/WIKIDATA Precision, Units and Coordinates: https://en.wikibooks.org/wiki/SPARQL/WIKIDATA_Precision,_Units_and_Coordinates#Quantities """ __all__ = ["convert_from_si", "conv...
292
9,060
searxng
searx/preferences.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Searx preferences implementation.""" # pylint: disable=useless-object-inheritance import typing as t from base64 import urlsafe_b64encode, urlsafe_b64decode from zlib import compress, decompress from urllib.parse import parse_qs, urlencode from collections import Order...
598
21,698
searxng
searx/version.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later # pylint: disable=,missing-module-docstring,missing-class-docstring import importlib import logging import os import shlex import subprocess # fallback values # if there is searx.version_frozen module, and it is not possible to get the git tag VERSION_STRING: str = "1.0.0"...
158
5,588
searxng
searx/openmetrics.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Module providing support for displaying data in OpenMetrics format""" import typing as t OMFTypeHintType = t.Literal["counter", "gauge", "histogram", "summary"] OMFDataInfoType = list[dict[str, str]] OMFDataType = list[t.Any] class OpenMetricsFamily: # pylint: disabl...
54
1,916
searxng
searx/_settings.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Implementation of the :py:obj:`preference <searx.preference>` settings.""" # pylint: disable = too-few-public-methods import typing as t import msgspec class SettingsPref(msgspec.Struct, kw_only=True, forbid_unknown_fields=True): """Options for configuring the pref...
43
1,020
searxng
searx/webadapter.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later # pylint: disable=missing-module-docstring from collections import defaultdict from typing import Dict, List, Optional, Tuple from searx.exceptions import SearxParameterException from searx.webutils import VALID_LANGUAGE_CODE from searx.query import RawTextQuery from searx....
301
11,173
searxng
searx/extended_types.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """This module implements the type extensions applied by SearXNG. - :py:obj:`flask.request` is replaced by :py:obj:`sxng_request` - :py:obj:`flask.Request` is replaced by :py:obj:`SXNG_Request` - :py:obj:`httpx.response` is replaced by :py:obj:`SXNG_Response` ---- .. py:a...
87
2,575
searxng
searx/compat.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Compatibility with older versions""" import warnings # limiter backward compatibility # ------------------------------ LIMITER_CFG_DEPRECATED = { "real_ip": "limiter: config section 'real_ip' is deprecated", "real_ip.x_for": "real_ip.x_for has been replaced by...
38
1,116
searxng
searx/external_bang.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later # pylint: disable=missing-module-docstring __all__ = ["get_bang_url"] import typing as t from urllib.parse import quote_plus, urlparse from searx.data import EXTERNAL_BANGS LEAF_KEY = chr(16) if t.TYPE_CHECKING: from searx.search.models import SearchQuery def get_...
110
3,566
searxng
searx/weather.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Implementations used for weather conditions and forecast.""" # pylint: disable=too-few-public-methods __all__ = [ "symbol_url", "Temperature", "Pressure", "WindSpeed", "RelativeHumidity", "Compass", "WeatherConditionType", "DateTime", ...
670
24,056
searxng
searx/query.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later # pylint: disable=invalid-name, missing-module-docstring, missing-class-docstring from abc import abstractmethod, ABC import re from searx import settings from searx.sxng_locales import sxng_locales from searx.engines import categories, engines, engine_shortcuts from searx...
350
12,848
searxng
searx/results.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later # pylint: disable=missing-module-docstring, missing-class-docstring import typing as t import warnings from collections import defaultdict from threading import RLock from searx import logger as log import searx.engines from searx.metrics import histogram_observe, counter...
357
13,046
searxng
searx/cache.py
.py
"""Implementation of caching solutions. - :py:obj:`searx.cache.ExpireCache` and its :py:obj:`searx.cache.ExpireCacheCfg` ---- """ __all__ = ["ExpireCacheCfg", "ExpireCacheStats", "ExpireCache", "ExpireCacheSQLite"] import abc from collections.abc import Iterator import dataclasses import datetime import hashlib imp...
501
17,826
searxng
searx/webutils.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later # pylint: disable=missing-module-docstring, invalid-name import os import pathlib import csv import hashlib import hmac import re import itertools import json from datetime import datetime, timedelta from typing import Iterable, List, Tuple, TYPE_CHECKING from io import S...
338
12,071
searxng
searx/autocomplete.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """This module implements functions needed for the autocompleter.""" # pylint: disable=use-dict-literal import string import random import json import typing as t from urllib.parse import urlencode import lxml.etree import lxml.html from httpx import HTTPError from searx...
424
12,727
searxng
searx/settings_loader.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Implementations for loading configurations from YAML files. This essentially includes the configuration of the (:ref:`SearXNG appl <searxng settings.yml>`) server. The default configuration for the application server is loaded from the :origin:`DEFAULT_SETTINGS_FILE <sea...
228
8,888
searxng
searx/webapp.py
.py
#!/usr/bin/env python # SPDX-License-Identifier: AGPL-3.0-or-later """WebApp""" # pylint: disable=use-dict-literal import json import os import sys import base64 from timeit import default_timer from html import escape from io import StringIO import typing import urllib import urllib.parse from urllib.parse import u...
1,413
50,680
searxng
searx/engines/privacywall.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Privacywall_ claims to be a "privacy-friendly" search engine, but according to a `Privacyguides discussion`_ it's sharing private user information with Microsoft and Amazon. .. _Privacywall : https://www.privacywall.org .. _`Privacyguides discussion` : https://discuss.pr...
218
7,778
searxng
searx/engines/sepiasearch.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """SepiaSearch uses the same languages as :py:obj:`Peertube <searx.engines.peertube>` and the response is identical to the response from the peertube engines. """ from urllib.parse import urlencode from datetime import datetime from searx.engines.peertube import fetch_tra...
77
2,133
searxng
searx/engines/bilibili.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Bilibili is a Chinese video sharing website. .. _Bilibili: https://www.bilibili.com """ import random import string from urllib.parse import urlencode from datetime import datetime, timedelta from zoneinfo import ZoneInfo from searx import utils # Engine metadata abou...
129
4,085
searxng
searx/engines/tusksearch.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Tusksearch_ is an American search engine that claims to fight censorship. Its search results are (at least partially) from Brave. .. _Tusksearch: https://tusksearch.com/about """ from json import loads import random import typing as t from urllib.parse import urlencode ...
165
5,512
searxng
searx/engines/searchzee.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """SearchZee is a small, indie project, web and news results pulled from independent search infrastructure.""" import typing as t from urllib.parse import urlencode from searx.exceptions import SearxEngineAPIException from searx.extended_types import SXNG_Response from sea...
97
2,903
searxng
searx/engines/demo_online.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Within this module we implement a *demo online engine*. Do not look to close to the implementation, its just a simple example which queries `The Art Institute of Chicago <https://www.artic.edu>`_ Configuration ============= To get in use of this *demo* engine add the f...
124
3,443
searxng
searx/engines/ansa.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Engine for Ansa, Italy's oldest news agency. To use this engine add the following entry to your engines list in ``settings.yml``: .. code:: yaml - name: ansa engine: ansa shortcut: ans disabled: false """ from urllib.parse import urlencode from lxml imp...
82
2,156
searxng
searx/engines/moviepilot.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Moviepilot is a German movie database, similar to IMDB or TMDB. It doesn't have any official API, but it uses JSON requests internally to fetch search results and suggestions, that's being used in this implementation. Moviepilot additionally allows to discover movies by...
117
3,558
searxng
searx/engines/open_meteo.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Open Meteo (weather)""" import typing as t from urllib.parse import urlencode from datetime import datetime from searx.result_types import EngineResults, WeatherAnswer from searx import weather about = { "website": "https://open-meteo.com", "wikidata_id": Non...
154
4,501
searxng
searx/engines/vimeo.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """ Wikipedia (Web """ from urllib.parse import urlencode from json import loads from dateutil import parser from searx.utils import extr # about about = { "website": 'https://vimeo.com/', "wikidata_id": 'Q156376', "official_api_documentation": 'http://develop...
68
1,647
searxng
searx/engines/geizhals.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Geizhals is a German website to compare the price of a product on the most common German shopping sites and find the lowest price. The sorting of the search results can be influenced by the following additions to the search term: ``asc`` or ``price`` To sort by price ...
98
2,873
searxng
searx/engines/mysql_server.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """MySQL is said to be the most popular open source database. Before enabling MySQL engine, you must install the package ``mysql-connector-python``. The authentication plugin is configurable by setting ``auth_plugin`` in the attributes. By default it is set to ``caching_s...
94
2,287
searxng
searx/engines/duckduckgo_web.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """DuckDuckGo Web (general) This implementation fetches the link to the first API page (i.e. ``links.duckduckgo.com/d.js?...``) from duckduckgo.com and uses the ``n`` parameter of the API to fetch all subsequent pages. This also means that it's not possible to immediately ...
157
4,672
searxng
searx/engines/openstreetmap.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """OpenStreetMap (Map)""" import re import urllib.parse from functools import partial from flask_babel import gettext from searx.data import OSM_KEYS_TAGS, CURRENCIES from searx.external_urls import get_external_url from searx.engines.wikidata import send_wikidata_query,...
459
15,777
searxng
searx/engines/rumble.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Rumble (Videos)""" from datetime import datetime from urllib.parse import urlencode from lxml import html # about from searx.utils import extract_text about = { "website": 'https://rumble.com/', "wikidata_id": 'Q104765127', "official_api_documentation": 'h...
85
2,795
searxng
searx/engines/freesound.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """ Freesound (Sound) """ from json import loads from urllib.parse import urlencode from datetime import datetime disabled = True api_key = "" # about about = { "website": "https://freesound.org", "wikidata_id": "Q835703", "official_api_documentation": "https:...
66
1,510
searxng
searx/engines/apple_maps.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Apple Maps""" from json import loads from time import time from urllib.parse import urlencode from searx.network import get as http_get from searx.engines.openstreetmap import get_key_label about = { "website": 'https://www.apple.com/maps/', "wikidata_id": 'Q27...
113
3,483
searxng
searx/engines/chefkoch.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Chefkoch is a German database of recipes.""" from datetime import datetime from urllib.parse import urlencode about = { 'website': "https://www.chefkoch.de", 'official_api_documentation': None, 'use_official_api': False, 'require_api_key': False, 're...
68
1,772
searxng
searx/engines/google_news.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """This is the implementation of the Google News engine. Google News has a different region handling compared to Google WEB. - the ``ceid`` argument has to be set (:py:obj:`ceid_list`) - the hl_ argument has to be set correctly (and different to Google WEB) - the gl_ argum...
325
8,826
searxng
searx/engines/devicons.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Devicons (icons)""" import typing as t from searx.result_types import EngineResults if t.TYPE_CHECKING: from extended_types import SXNG_Response from search.processors.online import OnlineParams about = { "website": "https://devicon.dev/", "wikidata_i...
64
1,828
searxng
searx/engines/naver.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later # pylint: disable=line-too-long """Naver for SearXNG""" from urllib.parse import urlencode from lxml import html from searx.exceptions import SearxEngineAPIException, SearxEngineXPathException from searx.result_types import EngineResults, MainResult from searx.utils import...
227
6,573
searxng
searx/engines/piped.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """An alternative privacy-friendly YouTube frontend which is efficient by design. `Piped’s architecture`_ consists of 3 components: - :py:obj:`backend <backend_url>` - :py:obj:`frontend <frontend_url>` - proxy .. _Piped’s architecture: https://docs.piped.video/docs/archit...
171
4,884
searxng
searx/engines/opensemantic.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Open Semantic Search""" from json import loads from urllib.parse import quote from dateutil import parser # about about = { "website": 'https://www.opensemanticsearch.org/', "wikidata_id": None, "official_api_documentation": 'https://www.opensemanticsearch.o...
45
1,143
searxng
searx/engines/adobe_stock.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """`Adobe Stock`_ is a service that gives access to millions of royalty-free assets. Assets types include photos, vectors, illustrations, templates, 3D assets, videos, motion graphics templates and audio tracks. .. Adobe Stock: https://stock.adobe.com/ Configuration ======...
222
6,437
searxng
searx/engines/solr.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """.. sidebar:: info - :origin:`solr.py <searx/engines/solr.py>` - `Solr <https://solr.apache.org>`_ - `Solr Resources <https://solr.apache.org/resources.html>`_ - `Install Solr <https://solr.apache.org/guide/installing-solr.html>`_ Solr_ is a popular search en...
94
2,493
searxng
searx/engines/nvd.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """National Vulnerability Database (it)""" from urllib.parse import urlencode from datetime import datetime from searx.result_types import EngineResults about = { "website": 'https://nvd.nist.gov', "wikidata_id": "Q6979334", "official_api_documentation": None, ...
69
2,003
searxng
searx/engines/wordnik.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Wordnik (general)""" from lxml.html import fromstring from searx.utils import extract_text from searx.result_types import EngineResults # about about = { "website": 'https://www.wordnik.com', "wikidata_id": 'Q8034401', "official_api_documentation": None, ...
49
1,333
searxng
searx/engines/wolframalpha_noapi.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """ Wolfram|Alpha (Science) """ from json import loads from urllib.parse import urlencode from searx.network import get as http_get from searx.enginelib import EngineCache # about about = { "website": 'https://www.wolframalpha.com/', "wikidata_id": 'Q207006', ...
133
3,697
searxng
searx/engines/google_play.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Google Play Apps & Google Play Movies""" from urllib.parse import urlencode from lxml import html from searx.utils import ( eval_xpath, extract_url, extract_text, eval_xpath_list, eval_xpath_getindex, ) about = { "website": "https://play.google.c...
113
3,571
searxng
searx/engines/dailymotion.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """ Dailymotion (Videos) ~~~~~~~~~~~~~~~~~~~~ .. _REST GET: https://developers.dailymotion.com/tools/ .. _Global API Parameters: https://developers.dailymotion.com/api/#global-parameters .. _Video filters API: https://developers.dailymotion.com/api/#video-filters .. _Fields...
247
7,417
searxng
searx/engines/lucide.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Browse one of the largest collections of copyleft icons that can be used for own projects (e.g. apps, websites). .. _Website: https://lucide.dev """ import typing as t from searx.result_types import EngineResults if t.TYPE_CHECKING: from extended_types import SXN...
70
1,804
searxng
searx/engines/nyaa.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Nyaa.si (Anime Bittorrent tracker)""" from urllib.parse import urlencode from lxml import html from searx.utils import ( eval_xpath_getindex, extract_text, int_or_zero, ) # about about = { "website": 'https://nyaa.si/', "wikidata_id": None, "off...
120
3,087
searxng
searx/engines/metacpan.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """metacpan""" from urllib.parse import urlunparse # about about = { "website": 'https://metacpan.org/', "wikidata_id": 'Q841507', "official_api_documentation": 'https://github.com/metacpan/metacpan-api/blob/master/docs/API-docs.md', "use_official_api": Tru...
77
2,003
searxng
searx/engines/frinkiac.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """ Frinkiac (Images) """ from json import loads from urllib.parse import urlencode # about about = { "website": 'https://frinkiac.com', "wikidata_id": 'Q24882614', "official_api_documentation": {'url': None, 'comment': 'see https://github.com/MitchellAW/CompuG...
52
1,465
searxng
searx/engines/bing_news.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Bing-News: description see :py:obj:`searx.engines.bing`. .. hint:: Bing News is *different* in some ways! """ from urllib.parse import urlencode from lxml import html from searx.enginelib.traits import EngineTraits from searx.engines.bing import ( get_locale_...
148
4,707
searxng
searx/engines/fyyd.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Fyyd (podcasts)""" import typing as t from datetime import datetime from urllib.parse import urlencode from searx.result_types import EngineResults if t.TYPE_CHECKING: from searx.extended_types import SXNG_Response from searx.search.processors import OnlinePar...
56
1,472
searxng
searx/engines/repology.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Repology_ monitors a huge number of package repositories and other sources comparing packages versions across them and gathering other information. Repology_ shows you in which repositories a given project is packaged, which version is the latest and which needs updating...
96
2,955
searxng
searx/engines/magnific.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Magnific_ is a database for images. .. _Magnific: https://www.magnific.com """ from urllib.parse import urlencode import typing as t from searx.result_types import EngineResults if t.TYPE_CHECKING: from searx.extended_types import SXNG_Response from searx.sea...
63
1,639
searxng
searx/engines/niconico.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Niconico search engine for searxng""" from urllib.parse import urlencode from datetime import datetime, timedelta from lxml import html from searx.utils import eval_xpath_getindex, eval_xpath_list, eval_xpath, extract_text about = { "website": "https://www.nicovide...
91
2,953
searxng
searx/engines/qwant.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """This engine uses the Qwant API (https://api.qwant.com/v3) to implement Qwant -Web, -News, -Images and -Videos. The API is undocumented but can be reverse engineered by reading the network log of https://www.qwant.com/ queries. For Qwant's *web-search* two alternatives a...
356
11,404
searxng
searx/engines/360search_videos.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later # pylint: disable=invalid-name """360Search-Videos: A search engine for retrieving videos from 360Search.""" from urllib.parse import urlencode from datetime import datetime from searx.exceptions import SearxEngineAPIException from searx.utils import html_to_text, get_embe...
66
1,897
searxng
searx/engines/pkg_go_dev.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """pkg.go.dev (packages)""" import re from urllib.parse import urlencode from dateutil import parser import babel import flask_babel from lxml import html from searx.utils import eval_xpath, eval_xpath_list, extract_text about = { 'website': 'https://pkg.go.dev/', ...
85
3,154
searxng
searx/engines/ipernity.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Ipernity (images)""" from datetime import datetime from json import loads, JSONDecodeError from urllib.parse import quote_plus from lxml import html from searx.utils import extr, extract_text, eval_xpath, eval_xpath_list about = { 'website': 'https://www.ipernity....
77
2,165
searxng
searx/engines/discourse.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """.. sidebar:: info - `builtwith.com Discourse <https://trends.builtwith.com/websitelist/Discourse>`_ Discourse is an open source Internet forum system. To search in a forum this engine offers some additional settings: - :py:obj:`base_url` - :py:obj:`api_order` - :py:...
180
4,401
searxng
searx/engines/valkey_server.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Valkey is an open source (BSD licensed), in-memory data structure (key value based) store. Before configuring the ``valkey_server`` engine, you must install the dependency valkey_. Configuration ============= Select a database to search in and set its index in the opti...
100
2,355
searxng
searx/engines/apkmirror.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """APKMirror""" # pylint: disable=invalid-name from urllib.parse import urlencode from lxml import html from searx.utils import ( eval_xpath_list, eval_xpath_getindex, extract_text, ) about = { "website": 'https://www.apkmirror.com', "wikidata_id": No...
61
1,470
searxng
searx/engines/mozhi.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Mozhi (alternative frontend for popular translation engines)""" import random import re import urllib.parse from searx.result_types import EngineResults about = { "website": 'https://codeberg.org/aryak/mozhi', "wikidata_id": None, "official_api_documentatio...
62
1,995
searxng
searx/engines/flickr_noapi.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Flickr (Images)""" import json from time import time import re from urllib.parse import urlencode from searx.utils import ecma_unescape, html_to_text # about about = { "website": 'https://www.flickr.com', "wikidata_id": 'Q103204', "official_api_documentation...
134
4,234
searxng
searx/engines/fdroid.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """ F-Droid (a repository of FOSS applications for Android) """ from urllib.parse import urlencode from lxml import html from searx.utils import extract_text # about about = { "website": 'https://f-droid.org/', "wikidata_id": 'Q1386210', "official_api_documenta...
55
1,505
searxng
searx/engines/spotify.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Spotify (Music)""" from json import loads from urllib.parse import urlencode import base64 from searx.network import post as http_post # about about = { "website": 'https://www.spotify.com', "wikidata_id": 'Q689141', "official_api_documentation": 'https://d...
76
2,059
searxng
searx/engines/tiger.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Tiger_ is a Swiss meta search engine. .. _Tiger: https://tiger.ch """ from json import loads import random from urllib.parse import urlencode import typing as t from dateutil import parser from lxml import html from searx.exceptions import SearxEngineAPIException fro...
176
5,818
searxng
searx/engines/yandex_music.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Yandex Music .. _Countries where Yandex.Music is available: https://yandex.com/support/music/access.html .. hint:: Access to music is limited to a few countries: `Countries where Yandex.Music is available`_ """ from urllib.parse import urlencode # about about ...
64
1,616
searxng
searx/engines/pinterest.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Pinterest (images)""" from json import dumps about = { "website": 'https://www.pinterest.com/', "wikidata_id": 'Q255381', "official_api_documentation": 'https://developers.pinterest.com/docs/api/v5/', "use_official_api": False, "require_api_key": Fal...
74
2,167
searxng
searx/engines/tootfinder.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Tootfinder (social media)""" from datetime import datetime from json import loads from searx.utils import html_to_text about = { 'website': "https://www.tootfinder.ch", 'official_api_documentation': "https://wiki.tootfinder.ch/index.php?name=the-tootfinder-rest-...
59
1,732
searxng
searx/engines/fireball.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Fireball_ is a Germany-based, privacy-focused search engine. It likely doesn't have its own index, but it's unclear where its results come from. .. _Fireball: https://fireball.com """ import typing as t from datetime import datetime from urllib.parse import urlencode ...
170
5,483
searxng
searx/engines/bt4g.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """BT4G_ (bt4g.com) is not a tracker and doesn't store any content and only collects torrent metadata (such as file names and file sizes) and a magnet link (torrent identifier). This engine does not parse the HTML page because there is an API in XML (RSS). The RSS feed prov...
119
3,091
searxng
searx/engines/libretranslate.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """LibreTranslate (Free and Open Source Machine Translation API)""" import random import json from searx.result_types import EngineResults about = { "website": 'https://libretranslate.com', "wikidata_id": None, "official_api_documentation": 'https://libretransl...
60
1,579
searxng
searx/engines/bandcamp.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Bandcamp (Music) @website https://bandcamp.com/ @provide-api no @results HTML @parse url, title, content, publishedDate, iframe_src, thumbnail """ from urllib.parse import urlencode, urlparse, parse_qs from dateutil.parser import parse as dateparse from l...
82
2,492
searxng
searx/engines/sourcehut.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Engine to search in the collaborative software platform SourceHut_. .. _SourceHut: https://sourcehut.org/ Configuration ============= You can configure the following setting: - :py:obj:`sourcehut_sort_order` .. code:: yaml - name: sourcehut shortcut: srht ...
91
2,487
searxng
searx/engines/yep.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Yep (general, images, news)""" import re import typing as t from urllib.parse import urlencode from searx.result_types import EngineResults from searx.utils import html_to_text, eval_xpath_getindex, extract_text if t.TYPE_CHECKING: from searx.enginelib.traits imp...
141
4,435
searxng
searx/engines/360search.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later # pylint: disable=invalid-name """360Search search engine for searxng""" import typing as t from urllib.parse import urlencode from lxml import html from searx import logger from searx.enginelib import EngineCache from searx.utils import extract_text from searx.network im...
115
3,298
searxng
searx/engines/marginalia.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """`Marginalia Search`_ is an independent open source Internet search engine operating out of Sweden. It is principally developed and operated by Viktor Lofgren . .. _Marginalia Search: https://about.marginalia-search.com/ Configuration ============= The engine has the...
128
3,202
searxng
searx/engines/wikidata.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """This module implements the Wikidata engine. Some implementations are shared from :ref:`wikipedia engine`. """ # pylint: disable=missing-class-docstring import typing as t import os from hashlib import md5 from urllib.parse import urlencode, unquote from json import loa...
893
32,439
searxng
searx/engines/crates.py
.py
# SPDX-License-Identifier: AGPL-3.0-or-later """Cargo search on crates.io""" from collections import OrderedDict from urllib.parse import urlencode from dateutil import parser about = { "website": "https://crates.io/", "wikidata_id": None, "official_api_documentation": "https://crates.io/data-access", ...
71
1,805