Commit Graph

80 Commits (584760cf5419051bd3f37e733147e048356f7ffc)

Author SHA1 Message Date
Alexandre Flament 8f914a28fa [mod] searx.utils.normalize_url: remove Yahoo hack
* The hack for Yahoo URLs is not necessary anymore. (see searx.engines.yahoo.parse_url)
* move the URL normalization in extract_url to normalize_url
4 years ago
Alexandre Flament c1d10bde02 [mod] searx/utils.py: add docstring 4 years ago
Alexandre Flament 2006eb4680 [mod] move extract_text, extract_url to searx.utils 4 years ago
Alexandre Flament ad0758e52a [mod] add searx/webutils.py
contains utility functions and classes used only by webapp.py
4 years ago
Alexandre Flament 6deb85072a [fix] searx.utils.HTMLTextExtractor: invalid HTML don't raise an Exception
Close #2188
4 years ago
Alexandre Flament bdac99d4f0 Drop Python 2 (5/n): searx.utils.is_valid_lang, input parameter is a str instead of bytes
Fix bug in translated.py and dictzone.py
4 years ago
Dalf c225db45c8 Drop Python 2 (4/n): SearchQuery.query is a str instead of bytes 4 years ago
Dalf 1022228d95 Drop Python 2 (1/n): remove unicode string and url_utils 4 years ago
Dalf 85b3723345 [mod] speed optimization
compile XPath only once
avoid redundant call to urlparse
get_locale(webapp.py): avoid useless call to request.accept_languages.best_match
5 years ago
Noémi Ványi 5796dc60c9 fix pep 8 check 5 years ago
Noémi Ványi a6f20caf32 add initial support for offline engines && command engine 5 years ago
Adam Tauber 72459b246b [fix] convert bytes type to string in language detection (fixes dictzone) 5 years ago
Alexandre Flament 2179079a91
[fix] fix flickr_noapi decoding (#1655)
Characters that were not ASCII were incorrectly decoded.
Add an helper function: searx.utils.ecma_unescape (Python implementation of unescape Javascript function).
5 years ago
Dalf 7e201cbf65 [mod] use cache in _match_language function to speed up searx start time significantly 5 years ago
rachmadani haryono ec88fb8a0f [fix] secret_key can be bytes instead of a string (#1602)
Fix #1600
In settings.yml, the secret_key can be written as string or as base64 encoded data using !!binary notation.
5 years ago
Alex 50c836864a fetch_firefox_version.py : compatible with Python 3 and minor fixes. 6 years ago
Alexandre Flament 066bd916bf [mod] fetch firefox versions in a standalone script 6 years ago
Adam Tauber d51732c0e5
Merge pull request #1303 from MarcAbonce/bing
Fix bing "garbage" results
6 years ago
Marc Abonce Seguin c7000cd1df [fix] update user agent versions
this fixes duckduckgo error response
6 years ago
Adam Tauber aef2b07969 [fix] add basestring for py3 6 years ago
Marc Abonce Seguin 75b276f408 fix bing "garbage" results (issue #1275) 6 years ago
Marc Abonce Seguin 772c048d01 refactor engine's search language handling
Add match_language function in utils to match any user given
language code with a list of engine's supported languages.

Also add language_aliases dict on each engine to translate
standard language codes into the custom codes used by the engine.
6 years ago
Adam Tauber 0969e50c5b [fix] convert json engine result attributes to string - closes #1006 7 years ago
Adam Tauber b5071fea6a [fix] remove trailing 0x00 from csv output 7 years ago
Adam Tauber 3d6c67951a [fix] resurrect csv output in py2 7 years ago
Noémi Ványi e73cb14889 fix hmac python3 compatibility 7 years ago
misnyo 33fd938016 [mod] int_or_zero refactored to searx_utils 7 years ago
potato 9b82cb1908 [fix] is_valid_lang fixed for new languages.py + dictzone engine encoding 7 years ago
Alexandre Flament 9c91ab33f8 [mod] settings.yml can be /etc/searx/settings.yml
The exact order is
* first from SEARX_SETTINGS_PATH,
* if not found then from searx code base,
* if not found then from /etc/searx/settings.yml
* if not found an exception stops searx loading
7 years ago
Alexandre Flament ee080feaed [mod] the static and templates directories can be defined in the settings.yml 7 years ago
Adam Tauber 52e615dede [enh] py3 compatibility 7 years ago
Alexandre Flament 7fdfeca3a4 [mod] add a __common__ template that can't be selected but that provides a common place for shared templates.
What has been moved into this template :
* opensearch*.xml is always the same whatever the themes.
* the text inside */about.html
8 years ago
Adam Tauber 55dc538398 [mod] move load_module function to utils 8 years ago
Noémi Ványi 53c9fde992 fix kickass torrents engine 8 years ago
potato 983415bc38 [enh] is_valid_lang moved to utils 8 years ago
Noemi Vanyi 3a1c5876b1 add digbt engine
Unfortunately, it is quite slow so it is disabled.
Furthermore, the display of number of files is wrong
on digbt.org, so it is not displayed on searx.
8 years ago
marc a4c77f88d0 [fix] exception if locale doesn't have a date format
occitan, for example
8 years ago
stepshal b3ab221b98 Fix anomalous backslash in string 8 years ago
stepshal cd9b494cb5 Fix quantity of blank lines after code object. 8 years ago
Adam Tauber 9f64fd6745 [enh] update useragent versions 8 years ago
Noemi Vanyi fe691a0988 new preferences handling
Preferences class was introduced in order to handle user preferences. Right now
it parses cookies and the form in preferences. Also it can retrieve settings
based on the name of the setting.

ATTENTION
Please note that engine preferences are handled differently from now on. So it
introduces incompatible changes. Every user who has saved preferences should reset and
save his/her settings again.

This change was needed, because everytime a default disabled engine was
added saved user preferences would broke. Now engine setting tracking is
fixed.
8 years ago
Adam Tauber d8ef944974 [enh] extend user agent versions 9 years ago
Adam Tauber 362c849797 [fix][mod] wikidata date handling refactor - fixes #387 9 years ago
Adam Tauber 7580852bda [enh] test utils.prettify_url 9 years ago
Adam Tauber 1fcf066a81 [mod] change settings file structure according to #314 9 years ago
Dalf 62cc2a5658 [fix] bing_news based on RSS output format 9 years ago
Alexandre Flament f5d3b21566 [fix] user agent : the "rv:{version}" was missing (can be a issue with some engine, like flickr) 9 years ago
Adam Tauber 996c797ab2 [fix] default blocked categories 10 years ago
Adam Tauber 1de781a143 [enh] category specific engine deactivation - closes #205 10 years ago
Adam Tauber 7f865356f9 Merge branch 'unit-tests' of https://github.com/Cqoicebordel/searx into Cqoicebordel-unit-tests
Conflicts:
	searx/tests/test_engines.py
10 years ago