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 | searx/engines/youtube_noapi.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Youtube (Videos)"""
from functools import reduce
from json import loads, dumps
from urllib.parse import quote_plus
from searx.utils import extr
# about
about = {
"website": 'https://www.youtube.com/',
"wikidata_id": 'Q866',
"official_api_documentation": 'ht... | 171 | 6,053 |
searxng | searx/engines/json_engine.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""The JSON engine is a *generic* engine with which it is possible to configure
engines in the settings.
Configuration
=============
Request:
- :py:obj:`search_url`
- :py:obj:`lang_all`
- :py:obj:`soft_max_redirects`
- :py:obj:`method`
- :py:obj:`request_body`
- :py:obj:`... | 434 | 11,108 |
searxng | searx/engines/500px.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
# pylint: disable=invalid-name
"""500px_ is a online network for photographers with millions of members
worldwide. Photographers come to 500px to discover and share incredible photos,
gain meaningful exposure, compete in photo contests, and license their photos
through our e... | 138 | 3,772 |
searxng | searx/engines/scanr_structures.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""
ScanR Structures (Science)
"""
from json import loads, dumps
from searx.utils import html_to_text
# about
about = {
"website": 'https://scanr.enseignementsup-recherche.gouv.fr',
"wikidata_id": 'Q44105684',
"official_api_documentation": 'https://scanr.enseig... | 87 | 2,067 |
searxng | searx/engines/elasticsearch.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
""".. sidebar:: info
- :origin:`elasticsearch.py <searx/engines/elasticsearch.py>`
- `Elasticsearch <https://www.elastic.co/elasticsearch/>`_
- `Elasticsearch Guide
<https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html>`_
- `Install El... | 195 | 5,848 |
searxng | searx/engines/flaticon.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Flaticon_ is a database for icons.
.. _Flaticon: https://www.flaticon.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.sear... | 72 | 1,846 |
searxng | searx/engines/sogou_images.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Sogou-Images: A search engine for retrieving images from Sogou."""
import json
import re
from urllib.parse import urlencode
# about
about = {
"website": "https://pic.sogou.com/",
"wikidata_id": "Q7554565",
"use_official_api": False,
"require_api_key": Fa... | 56 | 1,470 |
searxng | searx/engines/invidious.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Invidious (Videos)
If you want to use invidious with SearXNG you should setup one locally.
No public instance offer a public API now
- https://github.com/searxng/searxng/issues/2722#issuecomment-2884993248
"""
import time
import random
from urllib.parse import quote_p... | 118 | 3,641 |
searxng | searx/engines/alpinelinux.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""`Alpine Linux binary packages`_. `Alpine Linux`_ is a Linux-based operation
system designed to be small, simple and secure. Contrary to many other Linux
distributions, it uses musl, BusyBox and OpenRC. Alpine is mostly used on
servers and for Docker images.
.. _Alpine... | 84 | 3,051 |
searxng | searx/engines/s1search.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Search engines by System1 (general).
System1 is an advertising company, and provides all its search engines as a
subdomain of ``s1search.co``. As a result, it has more than 1000 subdomains, of
which some work, and some don't.
Some of the engines get their results from ... | 99 | 3,188 |
searxng | searx/engines/zlibrary.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""`Z-Library`_ (abbreviated as z-lib, formerly BookFinder) is a shadow library
project for file-sharing access to scholarly journal articles, academic texts
and general-interest books. It began as a mirror of Library Genesis, from which
most of its books originate.
.. _Z-... | 253 | 8,503 |
searxng | searx/engines/radio_browser.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Search radio stations from RadioBrowser by `Advanced station search API`_.
.. _Advanced station search API:
https://de1.api.radio-browser.info/#Advanced_station_search
"""
import os
import random
import socket
from urllib.parse import urlencode
import babel
from fl... | 254 | 7,746 |
searxng | searx/engines/peertube.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Peertube and :py:obj:`SepiaSearch <searx.engines.sepiasearch>` do share
(more or less) the same REST API and the schema of the JSON result is identical.
"""
import re
from datetime import datetime, timedelta
from urllib.parse import urlencode
import babel
from dateutil... | 183 | 5,942 |
searxng | searx/engines/hex.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""hex.pm"""
from urllib.parse import urlencode
from dateutil import parser
about = {
# pylint: disable=line-too-long
"website": "https://hex.pm/",
"wikidata_id": None,
"official_api_documentation": "https://github.com/hexpm/hexpm/blob/main/lib/hexpm_web/c... | 82 | 2,465 |
searxng | searx/engines/cachy_os.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""CachyOS (packages, it)"""
from urllib.parse import urlencode
from datetime import datetime
from searx.result_types import EngineResults
about = {
"website": 'https://cachyos.org',
"wikidata_id": "Q116777127",
"official_api_documentation": None,
"use_offi... | 60 | 1,618 |
searxng | searx/engines/mongodb.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""MongoDB_ is a document based database program that handles JSON like data.
Before configuring the ``mongodb`` engine, you must install the dependency
pymongo_.
Configuration
=============
In order to query MongoDB_, you have to select a ``database`` and a
``collection``... | 102 | 2,340 |
searxng | searx/engines/dummy-offline.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
# pylint: disable=invalid-name
"""Dummy Offline"""
# about
about = {
"wikidata_id": None,
"official_api_documentation": None,
"use_official_api": False,
"require_api_key": False,
"results": 'HTML',
}
def search(query, request_params): # pylint: disab... | 22 | 424 |
searxng | searx/engines/1337x.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
# pylint: disable=invalid-name
"""1337x"""
from urllib.parse import quote, urljoin
from lxml import html
from searx.utils import extract_text, eval_xpath, eval_xpath_list, eval_xpath_getindex
# about
about = {
"website": 'https://1337x.to/',
"wikidata_id": 'Q281341... | 55 | 1,622 |
searxng | searx/engines/arxiv.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""arXiv is a free distribution service and an open-access archive for nearly
2.4 million scholarly articles in the fields of physics, mathematics, computer
science, quantitative biology, quantitative finance, statistics, electrical
engineering and systems science, and econo... | 130 | 4,616 |
searxng | searx/engines/bpb.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""BPB refers to ``Bundeszentrale für poltische Bildung``, which is a German
governmental institution aiming to reduce misinformation by providing resources
about politics and history.
"""
from datetime import datetime
from urllib.parse import urlencode
about = {
'webs... | 68 | 1,863 |
searxng | searx/engines/www1x.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""1x (Images)"""
from urllib.parse import urlencode, urljoin
from lxml import html, etree
from searx.utils import extract_text, eval_xpath_list, eval_xpath_getindex
# about
about = {
"website": 'https://1x.com/',
"wikidata_id": None,
"official_api_documentati... | 62 | 1,649 |
searxng | searx/engines/stackexchange.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Stack Exchange API v2.3
* https://api.stackexchange.com/
"""
import html
from json import loads
from urllib.parse import urlencode
about = {
"website": 'https://stackexchange.com',
"wikidata_id": 'Q3495447',
"official_api_documentation": 'https://api.stack... | 71 | 1,590 |
searxng | searx/engines/google_videos.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""This is the implementation of the Google Videos engine.
.. admonition:: Content-Security-Policy (CSP)
This engine needs to allow images from the `data URLs`_ (prefixed with the
``data:`` scheme)::
Header set Content-Security-Policy "img-src 'self' data: ;"
... | 186 | 6,017 |
searxng | searx/engines/deepl.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Deepl translation engine"""
from searx.result_types import EngineResults
about = {
"website": 'https://deepl.com',
"wikidata_id": 'Q43968444',
"official_api_documentation": 'https://www.deepl.com/docs-api',
"use_official_api": True,
"require_api_key"... | 53 | 1,274 |
searxng | searx/engines/demo_offline.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Within this module we implement a *demo offline engine*. Do not look to
close to the implementation, its just a simple example.
Configuration
=============
To get in use of this *demo* engine add the following entry to your engines list
in ``settings.yml``:
.. code:: ... | 114 | 2,940 |
searxng | searx/engines/grokipedia.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Grokipedia (general)"""
from urllib.parse import urlencode
from searx.utils import html_to_text
from searx.result_types import EngineResults
about = {
"website": 'https://grokipedia.com',
"wikidata_id": "Q136410803",
"official_api_documentation": None,
"... | 53 | 1,210 |
searxng | searx/engines/resulthunter.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Resulthunter_ is an American search engine with results from Brave.
.. _Resulthunter : https://resulthunter.com
"""
import typing as t
from urllib.parse import urlencode
from lxml import html
from searx import locales
from searx.result_types import EngineResults
from ... | 121 | 3,714 |
searxng | searx/engines/sogou_wechat.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Sogou-WeChat search engine for retrieving WeChat Article from Sogou"""
from urllib.parse import urlencode
from datetime import datetime
import re
from lxml import html
from searx.utils import extract_text
# Metadata
about = {
"website": "https://weixin.sogou.com/",... | 77 | 2,084 |
searxng | searx/engines/lingva.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""`Lingva Translate`_ is an alternative front-end for Google Translate,
serving as a free and open source translator with over a hundred
languages available.
.. _Lingva Translate: https://github.com/thedaviddelta/lingva-translate
"""
import typing as t
from searx.result_... | 97 | 3,165 |
searxng | searx/engines/startpage.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Startpage's language & region selectors are a mess ..
.. _startpage regions:
Startpage regions
=================
In the list of regions there are tags we need to map to common region tags::
pt-BR_BR --> pt_BR
zh-CN_CN --> zh_Hans_CN
zh-TW_TW --> zh_Hant_TW
zh-... | 542 | 17,659 |
searxng | searx/engines/springer.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""`Springer Nature`_ is a global publisher dedicated to providing service to
research community with official Springer-API_ (API-Playground_).
.. note::
The Springer engine requires an API key, which can be obtained via the
`Springer subscription`_.
Since the searc... | 176 | 5,375 |
searxng | searx/engines/azure.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Engine for Azure resources. This engine mimics the standard search bar in Azure
Portal (for resources and resource groups).
Configuration
=============
You must `register an application in Microsoft Entra ID`_ and assign it the
'Reader' role in your subscription.
To u... | 191 | 6,950 |
searxng | searx/engines/goodreads.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Goodreads (books)"""
from urllib.parse import urlencode
from lxml import html
from searx.utils import extract_text, eval_xpath, eval_xpath_list
about = {
'website': 'https://www.goodreads.com',
'wikidata_id': 'Q2359213',
'official_api_documentation': None,
... | 57 | 1,569 |
searxng | searx/engines/ebay.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""
Ebay (Videos, Music, Files)
"""
from urllib.parse import quote
from lxml import html
from searx.engines.xpath import extract_text
# about
about = {
"website": 'https://www.ebay.com',
"wikidata_id": 'Q58024',
"official_api_documentation": 'https://developer... | 78 | 2,336 |
searxng | searx/engines/iqiyi.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""iQiyi: A search engine for retrieving videos from iQiyi."""
import typing
from urllib.parse import urlencode
from datetime import datetime, timedelta
from searx.exceptions import SearxEngineAPIException
about = {
"website": "https://www.iqiyi.com/",
"wikidata_... | 81 | 2,362 |
searxng | searx/engines/yandex.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Yandex (Web, images)"""
from json import loads
from urllib.parse import urlencode
from html import unescape
from lxml import html
from searx.exceptions import SearxEngineCaptchaException
from searx.utils import humanize_bytes, eval_xpath, eval_xpath_list, extract_text, e... | 153 | 4,705 |
searxng | searx/engines/wolframalpha_api.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Wolfram|Alpha (Science)"""
from urllib.parse import urlencode
import lxml.etree
# about
about = {
"website": 'https://www.wolframalpha.com',
"wikidata_id": 'Q207006',
"official_api_documentation": 'https://products.wolframalpha.com/api/',
"use_official_... | 140 | 4,248 |
searxng | searx/engines/wikicommons.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""`Wikimedia Commons`_ is a collection of more than 120 millions freely usable
media files to which anyone can contribute.
This engine uses the `MediaWiki query API`_, with which engines can be configured
for searching images, videos, audio, and other files in the Wikimedi... | 209 | 6,278 |
searxng | searx/engines/material_icons.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Material Icons (icons)"""
import re
from json import loads
about = {
"website": 'https://fonts.google.com/icons',
"wikidata_id": 'Q107315222',
"official_api_documentation": None,
"use_official_api": False,
"require_api_key": False,
"results": 'JS... | 62 | 2,064 |
searxng | searx/engines/pixiv.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Pixiv (images)"""
from urllib.parse import urlencode
import random
# Engine metadata
about = {
"website": 'https://www.pixiv.net/',
"wikidata_id": 'Q306956',
"official_api_documentation": None,
"use_official_api": False,
"require_api_key": False,
... | 76 | 1,990 |
searxng | searx/engines/lib_rs.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""lib.rs (packages)"""
from urllib.parse import quote_plus
from lxml import html
from searx.utils import eval_xpath, eval_xpath_list, extract_text
about = {
'website': 'https://lib.rs',
'wikidata_id': 'Q113486010',
'use_official_api': False,
'require_api_k... | 56 | 1,698 |
searxng | searx/engines/loc.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Library of Congress: query Photo, Print and Drawing from API endpoint_
``photos``.
.. _endpoint: https://www.loc.gov/apis/json-and-yaml/requests/endpoints/
.. note::
Beside the ``photos`` endpoint_ there are more endpoints available / we are
looking forward for c... | 98 | 2,575 |
searxng | searx/engines/huggingface.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""`Hugging Face`_ search engine for SearXNG.
.. _Hugging Face: https://huggingface.co
Configuration
=============
The engine has the following additional settings:
- :py:obj:`huggingface_endpoint`
Configurations for endpoints:
.. code:: yaml
- name: huggingface
... | 117 | 2,865 |
searxng | searx/engines/jisho.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""
Jisho (the Japanese-English dictionary)
"""
from urllib.parse import urlencode, urljoin
# about
about = {
"website": 'https://jisho.org',
"wikidata_id": 'Q24568389',
"official_api_documentation": "https://jisho.org/forum/54fefc1f6e73340b1f160000-is-there-an... | 138 | 4,620 |
searxng | searx/engines/hackernews.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Hackernews"""
from datetime import datetime
from urllib.parse import urlencode
from dateutil.relativedelta import relativedelta
from flask_babel import gettext
from searx.utils import html_to_text
# Engine metadata
about = {
"website": "https://news.ycombinator.com... | 96 | 3,004 |
searxng | searx/engines/neocities.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Neocities_ is open source software for creating blogs.
.. _Neocities : https://github.com/neocities/neocities
"""
from urllib.parse import urlencode
import typing as t
from lxml import html
from searx.utils import eval_xpath, eval_xpath_list, extract_text
from searx.r... | 67 | 1,974 |
searxng | searx/engines/command.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""With *command engines* administrators can run engines to integrate arbitrary
shell commands.
.. attention::
When creating and enabling a ``command`` engine on a public instance, you
must be careful to avoid leaking private data.
The easiest solution is to limit t... | 244 | 7,401 |
searxng | searx/engines/braveapi.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Engine to search using the Brave (WEB) Search API.
.. _Brave Search API: https://api-dashboard.search.brave.com/documentation
Configuration
=============
The engine has the following mandatory setting:
- :py:obj:`api_key`
Optional settings are:
- :py:obj:`results_pe... | 134 | 3,626 |
searxng | searx/engines/microsoft_learn.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Engine for Microsoft Learn, Microsoft's technical knowledge base.
To use this engine add the following entry to your engines list
in ``settings.yml``:
.. code:: yaml
- name: microsoft learn
engine: microsoft_learn
shortcut: msl
disabled: false
"""
from u... | 69 | 1,693 |
searxng | searx/engines/kagi.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Kagi_ is a paid, privacy-focused search engine.
Using it requires an API key. If you have a Kagi account, you can obtain an API
key in the `API portal`_.
To enable Kagi, add the following to the ``engines`` seciton of
``settings.yml``:
.. code:: yaml
- name: kagi
... | 199 | 6,239 |
searxng | searx/engines/digbt.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""
DigBT (Videos, Music, Files)
"""
from urllib.parse import urljoin
from lxml import html
from searx.utils import extract_text
# about
about = {
"website": 'https://digbt.org',
"wikidata_id": None,
"official_api_documentation": None,
"use_official_api": F... | 65 | 1,689 |
searxng | searx/engines/acfun.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Acfun search engine for searxng"""
from urllib.parse import urlencode
import re
import json
from datetime import datetime, timedelta
from lxml import html
from searx.utils import extract_text
# Metadata
about = {
"website": "https://www.acfun.cn/",
"wikidata_id... | 110 | 3,244 |
searxng | searx/engines/yandex_api.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Yandex Search API (the official **paid** `Yandex Search API v2`_).
Unlike the :origin:`yandex <searx/engines/yandex.py>` engine (which scrapes the
public HTML interface and is prone to CAPTCHA blocking), this engine talks to
the official, paid Yandex Cloud Search API. I... | 218 | 7,396 |
searxng | searx/engines/seznam.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Seznam"""
from urllib.parse import urlencode
from lxml import html
from searx.network import get
from searx.exceptions import SearxEngineAccessDeniedException
from searx.utils import (
extract_text,
eval_xpath_list,
eval_xpath_getindex,
)
# about
about = {
... | 72 | 1,990 |
searxng | searx/engines/docker_hub.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Docker Hub (IT)"""
# pylint: disable=use-dict-literal
from urllib.parse import urlencode
from dateutil import parser
about = {
"website": 'https://hub.docker.com',
"wikidata_id": 'Q100769064',
"official_api_documentation": 'https://docs.docker.com/registry/s... | 70 | 2,179 |
searxng | searx/engines/tonline.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""T-Online_ is a German news portal, which is powered by Ströer, a German
advertising company, not by Deutsche Telekom (contrary to its name).
It gets its web results from Google, image results from Flickr and videos
results from YouTube.
.. _T-Online: https://www.t-onlin... | 149 | 5,453 |
searxng | searx/engines/yahoo_news.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Yahoo (News)
Yahoo News is "English only" and do not offer localized nor language queries.
"""
# pylint: disable=invalid-name
import re
from urllib.parse import urlencode
from datetime import datetime, timedelta
from dateutil import parser
from lxml import html
from ... | 104 | 2,773 |
searxng | searx/engines/base.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""BASE (Scholar publications)"""
from datetime import datetime
import re
from urllib.parse import urlencode
from lxml import etree
from searx.utils import searxng_useragent
# about
about = {
"website": 'https://base-search.net',
"wikidata_id": 'Q448335',
"offi... | 117 | 3,190 |
searxng | searx/engines/openalex.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""The OpenAlex engine integrates the `OpenAlex`_ Works API to return scientific
paper results using the :ref:`result_types.paper` class. It is an "online" JSON
engine that uses the official public API and does not require an API key.
.. _OpenAlex: https://openalex.org
.. ... | 297 | 9,934 |
searxng | searx/engines/piratebay.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""
Piratebay (Videos, Music, Files)
"""
from json import loads
from datetime import datetime
from operator import itemgetter
from urllib.parse import quote
from searx.utils import humanize_bytes
# about
about = {
"website": 'https://thepiratebay.org',
"wikidata_i... | 95 | 2,638 |
searxng | searx/engines/dogpile.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Dogpile is a metasearch engine by the American advertising company `System1`_.
.. _System1: https://system1.com/
"""
import typing as t
from datetime import datetime, timezone
import html
from searx.utils import format_duration, html_to_text, humanize_number
from searx... | 103 | 3,434 |
searxng | searx/engines/bitchute.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""bitchute (Videos)"""
from json import dumps
from datetime import datetime
from searx.utils import html_to_text
about = {
"website": 'https://bitchute.com',
"wikidata_id": "Q45287179",
"official_api_documentation": None,
"use_official_api": False,
"re... | 57 | 1,674 |
searxng | searx/engines/duden.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Duden"""
from urllib.parse import quote, urljoin
from lxml import html
from searx.utils import extract_text, eval_xpath, eval_xpath_list, eval_xpath_getindex
from searx.network import raise_for_httperror
# about
about = {
"website": 'https://www.duden.de',
"wiki... | 62 | 1,788 |
searxng | searx/engines/wttr.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""wttr.in (weather forecast service)"""
import typing as t
from urllib.parse import quote
from datetime import datetime
from searx.result_types import EngineResults, WeatherAnswer
from searx import weather
about = {
"website": "https://wttr.in",
"wikidata_id": "... | 127 | 3,913 |
searxng | searx/engines/chatnoir.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Chatnoir is an open source search engine developed by Webis, a network of
researchers from the universities of Weimar, Halle and Leipzig. It supports
different different text corpora as indexes, e.g. CommonCrawl. See its
`announcement`_ for more information.
.. _announce... | 116 | 3,327 |
searxng | searx/engines/uxwing.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""UXwing (images)"""
from urllib.parse import quote_plus
from lxml import html
from searx.utils import eval_xpath, eval_xpath_list, extract_text
about = {
"website": 'https://uxwing.com',
"wikidata_id": None,
"official_api_documentation": None,
"use_offic... | 52 | 1,472 |
searxng | searx/engines/google.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""This is the implementation of the Google WEB engine. Some of this
implementations (manly the :py:obj:`get_google_info`) are shared by other
engines:
- :ref:`google images engine`
- :ref:`google news engine`
- :ref:`google videos engine`
- :ref:`google scholar engine`
- ... | 536 | 19,142 |
searxng | searx/engines/github.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Github (IT)"""
from urllib.parse import urlencode
from dateutil import parser
# about
about = {
"website": 'https://github.com/',
"wikidata_id": 'Q364',
"official_api_documentation": 'https://developer.github.com/v3/',
"use_official_api": True,
"requ... | 66 | 2,038 |
searxng | searx/engines/findthatmeme.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""FindThatMeme (Images)"""
from json import dumps
from datetime import datetime
from searx.utils import humanize_bytes
about = {
"website": 'https://findthatmeme.com',
"official_api_documentation": None,
"use_official_api": False,
"require_api_key": False,... | 55 | 1,561 |
searxng | searx/engines/pdbe.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""
PDBe (Protein Data Bank in Europe)
"""
from json import loads
from flask_babel import gettext
# about
about = {
"website": 'https://www.ebi.ac.uk/pdbe',
"wikidata_id": 'Q55823905',
"official_api_documentation": 'https://www.ebi.ac.uk/pdbe/api/doc/search.htm... | 123 | 3,820 |
searxng | searx/engines/findfiles.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""FindFiles.net_ is a Germany-based file search engine.
FindFiles.net_ is a specialized file search engine designed to help you search
files online with precision. Unlike traditional search engines that mainly index
web pages, FindFiles focuses on finding real files on the... | 119 | 3,985 |
searxng | searx/engines/apple_app_store.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Apple App Store"""
from json import loads
from urllib.parse import urlencode
from dateutil.parser import parse
about = {
"website": 'https://www.apple.com/app-store/',
"wikidata_id": 'Q368215',
"official_api_documentation": (
'https://developer.apple... | 55 | 1,439 |
searxng | searx/engines/semantic_scholar.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""`Semantic Scholar`_ provides free, AI-driven search and discovery tools, and
open resources for the global research community. `Semantic Scholar`_ index
over 200 million academic papers sourced from publisher partnerships, data
providers, and web crawls.
.. _Semantic Sc... | 164 | 5,275 |
searxng | searx/engines/archlinux.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""
Arch Linux Wiki
~~~~~~~~~~~~~~~
This implementation does not use a official API: Mediawiki provides API, but
Arch Wiki blocks access to it.
"""
from urllib.parse import urlencode, urljoin, urlparse
import babel
import lxml
from searx.enginelib.traits import EngineTr... | 153 | 4,763 |
searxng | searx/engines/chinaso.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""ChinaSo_, a search engine for the chinese language area.
.. attention::
ChinaSo engine does not return real URL, the links from these search
engines violate the privacy of the users!!
We try to find a solution for this problem, please follow `issue #4694`_.
... | 142 | 3,923 |
searxng | searx/engines/kickass.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Kickass Torrent (Videos, Music, Files)"""
import random
from operator import itemgetter
from urllib.parse import quote
from lxml import html
from searx.utils import (
eval_xpath,
eval_xpath_getindex,
eval_xpath_list,
extract_text,
int_or_zero,
)
abo... | 62 | 2,002 |
searxng | searx/engines/searx_engine.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""
Searx (all)
"""
from json import loads
from searx.engines import categories as searx_categories
# about
about = {
"website": 'https://github.com/searxng/searxng',
"wikidata_id": 'Q17639196',
"official_api_documentation": 'https://docs.searxng.org/dev/search... | 58 | 1,312 |
searxng | searx/engines/deviantart.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Deviantart (Images)"""
import urllib.parse
from lxml import html
from searx.utils import extract_text, eval_xpath, eval_xpath_list
# about
about = {
"website": 'https://www.deviantart.com/',
"wikidata_id": 'Q46523',
"official_api_documentation": 'https://ww... | 86 | 2,526 |
searxng | searx/engines/senscritique.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""SensCritique (movies)"""
import typing as t
from json import dumps, loads
from searx.result_types import EngineResults, MainResult
about = {
"website": 'https://www.senscritique.com/',
"wikidata_id": 'Q16676060',
"official_api_documentation": None,
"use... | 151 | 3,977 |
searxng | searx/engines/gitlab.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Engine to search in collaborative software platforms based on GitLab_ with
the `GitLab REST API`_.
.. _GitLab: https://about.gitlab.com/install/
.. _GitLab REST API: https://docs.gitlab.com/ee/api/
Configuration
=============
The engine has the following mandatory sett... | 96 | 2,312 |
searxng | searx/engines/annas_archive.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""`Anna's Archive`_ is a free non-profit online shadow library metasearch
engine providing access to a variety of book resources (also via IPFS), created
by a team of anonymous archivists (AnnaArchivist_).
.. _Anna's Archive: https://annas-archive.gl/
.. _AnnaArchivist: ht... | 295 | 9,093 |
searxng | searx/engines/quark.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Quark (Shenma) search engine for searxng"""
from urllib.parse import urlencode
from datetime import datetime
import re
import json
from searx.utils import html_to_text
from searx.exceptions import SearxEngineAPIException, SearxEngineCaptchaException
# Metadata
about = ... | 381 | 12,226 |
searxng | searx/engines/tokyotoshokan.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Tokyo Toshokan (A BitTorrent Library for Japanese Media)"""
import re
from datetime import datetime
from urllib.parse import urlencode
from lxml import html
from searx.utils import extract_text, int_or_zero
# about
about = {
"website": 'https://www.tokyotosho.info/... | 95 | 3,254 |
searxng | searx/engines/destatis.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""DeStatis"""
from urllib.parse import urlencode
from lxml import html
from searx.utils import eval_xpath, eval_xpath_list, extract_text
about = {
'website': 'https://www.destatis.de',
'official_api_documentation': 'https://destatis.api.bund.dev/',
'use_offici... | 67 | 2,227 |
searxng | searx/engines/openclipart.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""OpenClipArt (images)"""
from urllib.parse import urlencode
from lxml import html
from searx.utils import extract_text, eval_xpath, eval_xpath_list
about = {
"website": 'https://openclipart.org/',
"wikidata_id": 'Q979593',
"official_api_documentation": None,
... | 48 | 1,223 |
searxng | searx/engines/voidlinux.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""SearXNG engine for `Void Linux binary packages`_. Void is a general purpose
operating system, based on the monolithic Linux kernel. Its package system
allows you to quickly install, update and remove software; software is provided
in binary packages or can be built direc... | 91 | 2,985 |
searxng | searx/engines/core.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""CORE_ (COnnecting REpositories) provides a comprehensive bibliographic
database of the world’s scholarly literature, collecting and indexing
research from repositories and journals.
.. _CORE: https://core.ac.uk/about
.. note::
The CORE engine requires an :py:obj:`AP... | 162 | 4,536 |
searxng | searx/result_types/paper.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Typification of the *paper* results.
.. _BibTeX field types: https://en.wikipedia.org/wiki/BibTeX#Field_types
.. _BibTeX format: https://www.bibtex.com/g/bibtex-format/
Results of this type are rendered in the :origin:`paper.html
<searx/templates/simple/result_templates... | 95 | 2,386 |
searxng | searx/result_types/_base.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
# pylint: disable=too-few-public-methods, missing-module-docstring
"""Basic types for the typification of results.
- :py:obj:`Result` base class
- :py:obj:`LegacyResult` for internal use only
----
.. autoclass:: Result
:members:
.. _LegacyResult:
.. autoclass:: Legac... | 596 | 21,019 |
searxng | searx/result_types/__init__.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Typification of the result items generated by the *engines*, *answerers* and
*plugins*.
.. note::
We are at the beginning of typing the results. Further typing will follow,
but this is a very large task that we will only be able to implement
gradually. For mo... | 89 | 2,273 |
searxng | searx/result_types/image.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Typification of the *image* results. Results of this type are rendered in
the :origin:`images.html <searx/templates/simple/result_templates/images.html>`
template.
.. autoclass:: Image
:members:
:show-inheritance:
.. autoclass:: ImageRef
:members:
"""
# pylin... | 122 | 3,737 |
searxng | searx/result_types/file.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""
Typification of the *file* results. Results of this type are rendered in
the :origin:`file.html <searx/templates/simple/result_templates/file.html>`
template.
----
.. autoclass:: File
:members:
:show-inheritance:
"""
# pylint: disable=too-few-public-methods
_... | 95 | 2,953 |
searxng | searx/result_types/code.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Typification of the *code* results. Results of this type are rendered in
the :origin:`code.html <searx/templates/simple/result_templates/code.html>`
template. For highlighting the code passages, Pygments_ is used.
.. _Pygments: https://pygments.org
----
.. autoclass... | 181 | 6,933 |
searxng | searx/result_types/keyvalue.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""
Typification of the *keyvalue* results. Results of this type are rendered in
the :origin:`keyvalue.html <searx/templates/simple/result_templates/keyvalue.html>`
template.
----
.. autoclass:: KeyValue
:members:
:show-inheritance:
"""
# pylint: disable=too-few-pu... | 49 | 1,220 |
searxng | searx/result_types/answer.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""
Typification of the *answer* results. Results of this type are rendered in
the :origin:`answers.html <searx/templates/simple/elements/answers.html>`
template.
----
.. autoclass:: BaseAnswer
:members:
:show-inheritance:
.. autoclass:: Answer
:members:
:sho... | 238 | 7,512 |
searxng | searx/search/models.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
# pylint: disable=missing-module-docstring
import typing
import babel
class EngineRef:
"""Reference by names to an engine and category"""
__slots__ = 'name', 'category'
def __init__(self, name: str, category: str):
self.name = name
self.categ... | 120 | 3,752 |
searxng | searx/search/__init__.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
# pylint: disable=missing-module-docstring, too-few-public-methods
__all__ = ["SearchWithPlugins"]
import typing as t
import threading
from timeit import default_timer
from uuid import uuid4
from flask import copy_current_request_context
from searx import logger
from se... | 210 | 8,266 |
searxng | searx/search/processors/online.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Processor used for ``online`` engines."""
__all__ = ["OnlineProcessor", "OnlineParams"]
import typing as t
from timeit import default_timer
import asyncio
import ssl
import httpx
import searx.network
from searx.utils import gen_useragent
from searx.exceptions import (... | 285 | 9,899 |
searxng | searx/search/processors/offline.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Processors for engine-type: ``offline``"""
import typing as t
from .abstract import EngineProcessor, RequestParams
if t.TYPE_CHECKING:
from searx.results import ResultContainer
class OfflineProcessor(EngineProcessor):
"""Processor class used by ``offline`` eng... | 33 | 1,090 |
searxng | searx/search/processors/__init__.py | .py | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Implement request processors used by engine-types."""
__all__ = [
"OfflineParamTypes",
"OnlineCurrenciesParams",
"OnlineDictParams",
"OnlineParamTypes",
"OnlineParams",
"OnlineUrlSearchParams",
"PROCESSORS",
"ParamTypes",
"RequestParam... | 108 | 3,622 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.