Commit Graph

81 Commits

Author SHA1 Message Date
Grant Lanham Jr 75b859d2a8
Fix quoting issue in search_operator plugin (#3479) 2023-04-05 09:28:58 +02:00
Kian-Meng Ang 629ebb426f
Fix typos (#3366)
Found via `codespell -S ./searx/translations,./searx/data,./searx/static -L ans,te,fo,doubleclick,tthe,dum`
2022-09-29 23:06:59 +02:00
Noémi Ványi a825690804
Add search operators plugin (#3311)
## What does this PR do?

This PR adds search operator plugin to searx. By default it is disabled because it
removes results from your result set. Thus, you might end up with an empty result page with
the additional filtering.

## Why is this change important?

With all of its shortcomings, still is a nifty plugin.

## How to test this PR locally?

```
batman -site:imdb.com
```

Co-authored-by: DiamondDemon669 <62653580+DiamondDemon669@users.noreply.github.com>
2022-07-31 17:37:48 +02:00
Allen b0888c6ca3
[enh] Add Pagination to Wiby / Fix Kaufland (#3000)
* [fix] Fix Kaufland engine

Changed Xpath expressions

* [enh] Remove tracking params from Kaufland results

* [enh] Add pagination to Wiby

* [fix] Properly select title_xpath

Co-authored-by: Noémi Ványi <kvch@users.noreply.github.com>
2021-10-10 20:52:06 +02:00
Flodur871 8ecc8c5745
[enh] Fix uppercase ip query (#2991)
## What does this PR do?

Fixes the self_info plugin to support uppercase ip queries.

## Why is this change important?

This PR solves the mild annoyance of retyping IP in lowercase.

## Related issues

Closes #2888
2021-10-02 13:35:22 +02:00
3nprob fc4bf4bf10 Add hostname_replace plugin 2021-04-29 21:48:05 +02:00
3nprob 2ca0aa4f29 Remove hubsbpot tracking URL params
More information here:
https://knowledge.hubspot.com/settings/how-do-i-create-a-tracking-url
https://knowledge.hubspot.com/ads/ad-tracking-in-hubspot
https://knowledge.hubspot.com/ctas/calls-to-action-frequently-asked-questions
https://meta.stackexchange.com/questions/263392/what-are-these-very-long-parameters-in-so-careers-feedback-always-welcome-url
2021-04-06 02:11:09 +09:00
Markus Heiser ebfd0eb2b7 [fix] default_doi_resolver in preferences
Instead of a hard-coded `oadoi.org` default, use the default value from
`settings.yml`.

Fix an issue in the themes: The replacement 'current_doi_resolver' contains the
doi_resolver_url, not the name of the DOI resolver.  Compare return value of::

    searx.plugins.oa_doi_rewrite.get_doi_resolver(...)

Fix a typo in `get_doi_resolver(..)`:  suggested by @kvch:

  *L32 should set doi_resolver not doi_resolvers*

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-04-04 13:36:33 +02:00
Alexandre Flament b00d108673 [mod] pylint: numerous minor code fixes 2020-12-01 15:21:19 +01:00
Alexandre Flament 3038052c79 [mod] remove unused import
use
from searx.engines.duckduckgo import _fetch_supported_languages, supported_languages_url  # NOQA
so it is possible to easily remove all unused import using autoflake:
autoflake --in-place --recursive --remove-all-unused-imports searx tests
2020-11-14 14:11:02 +01:00
Alexandre Flament 5e7060053c [mod] ahmia_filter.py: minor changes
- use result['parsed_url']
- load ahmia_blacklist.txt in searx.datae
2020-10-27 20:00:04 +01:00
Marc Abonce Seguin 32957cdf49 add Ahmia filter plugin for onion results 2020-10-25 17:59:43 -07:00
Venca24 2b93e70a26 [fix] code style 2020-10-24 09:20:55 +02:00
Venca24 1cbcf2ccb6 [mod] adapt hash plugin to current version of searx 2020-10-23 21:35:13 +02:00
Venca24 40c552c11e [fix] hash plugin 2020-10-23 21:26:42 +02:00
Venca24 69e5a58058 [fix] code style 2020-10-23 21:26:42 +02:00
Venca24 1ea9438f5d [fix] hash plugin 2020-10-23 21:25:10 +02:00
Venca24 c9593c8ffd [enh] add plugin converting strings into hash digests 2020-10-23 21:25:10 +02:00
Adam Tauber a05c660e30 [enh] add ability to set enabled plugins from settings - closes #1613 #778 2020-10-09 14:12:31 +02:00
Dalf c225db45c8 Drop Python 2 (4/n): SearchQuery.query is a str instead of bytes 2020-09-10 10:49:42 +02:00
Dalf 1022228d95 Drop Python 2 (1/n): remove unicode string and url_utils 2020-09-10 10:39:04 +02:00
Noémi Ványi 74013c212a Revert "[enh] new plugin to open results on new browser tabs"
This reverts commit ab6a7601cb.

Closes #2037
2020-07-29 22:10:16 +02:00
Adam Tauber 93ac4db312 [enh] copy atime_ns and mtime_ns of external plugin resources 2020-07-28 13:57:57 +02:00
Adam Tauber 164e4725f3 [mod] add dedicated directory to external plugins with gitignore file 2020-07-28 13:10:40 +02:00
Adam Tauber 3f60bb470a [fix] correct imported modules 2020-07-28 13:10:40 +02:00
Adam Tauber dff879d07d [fix] resolve minor review issues 2020-07-28 13:10:40 +02:00
Adam Tauber e45a269ecb [mod] create static directory for each external plugin 2020-07-28 13:10:40 +02:00
Adam Tauber 81e9c75534 [fix] pep8 2020-07-28 13:10:40 +02:00
Adam Tauber 7b93d11d84 [fix] add plugin sha sum check to be able to copy updated resources 2020-07-28 13:10:40 +02:00
Adam Tauber 1f2dc6c647 [enh] add external plugin support 2020-07-28 13:10:40 +02:00
Lukáš Kucharczyk 74e4e5e507
Allow localization of "Self Informations"
Allows the string "Self Informations" in the plugin of the same name to be localized by wrapping it with gettext().
2020-07-16 15:26:01 +02:00
Adam Tauber 2c6531b233 [enh] add routing directions to osm search - closes #254 2020-06-09 17:18:44 +02:00
Marc Abonce Seguin dede46a2d5 fix out of range error in tracker remover plugin 2019-10-22 23:17:00 -07:00
Noémi Ványi a6f20caf32 add initial support for offline engines && command engine 2019-10-16 15:52:48 +02:00
Adam Tauber ed1c1bdb04 [fix] pep8 2019-10-14 15:09:39 +02:00
Adam Tauber 28c75c187f [fix] update query params sanitization - closes #722 2019-10-14 14:58:20 +02:00
Étienne Deparis 0d4d58f794 [enh] Add preference section to two upstream plugins for simple theme integration 2019-01-07 10:48:14 +01:00
Adam Tauber 19f18a2638
Merge pull request #1360 from Popolon/master
get_doi_resolver return doi resolver url instead of doi resolver name
2018-08-19 13:14:53 +02:00
Alex 3ba0d0516e simple theme update
- npm package update
- apply #1226
- implement vim help dialog
- display cookies and search URL with preferences
- allow to enable / disable Open Access DOI rewrite
- add a clear text button on the left of the search button
- implement #1011 : the HTML title page is not set when using POST
- remove searx/static/themes/simple/img/loader.gif
- use full width when only there are only images as result
2018-08-14 17:21:30 +02:00
Popolon 00b8aa113f remove double spaces 2018-08-07 17:57:33 +02:00
Popolon 3a160d3aed return doi resolver url instead of doi resolver name 2018-08-06 00:53:55 +02:00
Noémi Ványi 1b10abfc92 minor fixes of doi resolver
Closes #1047
2017-11-01 17:02:38 +01:00
jibe-b 575159b194 [enh] oa_doi_rewrite plugin broadens doai_rewrite 2017-11-01 14:22:26 +01:00
Alexandre Flament 10a24bdc2c [enh] add simple theme (WIP) 2017-08-06 16:04:21 +02:00
Adam Tauber 52e615dede [enh] py3 compatibility 2017-05-15 12:02:30 +02:00
Alexandre Flament 84a2c97a65 [mod] searx uses flask framework only in webapp.py. Make migration to another framework easier. 2017-01-02 12:06:04 +01:00
Adam Tauber 88dfee858e [fix] rewrite missing variable 2016-11-14 17:25:21 +01:00
dalf fbb080f358 Change plugin API :
- pre_search(request, search)
- post_search(request, search)
- on_result(request, search, result)

with
- request is the Flask request
- search a searx.Search instance
- result a searx result as usual
2016-11-02 14:22:16 +01:00
dalf 67e11c42b9 Clean up the architecture
Purposes :
- isolate the plugins calls
- distinction between parsing the web request and running the search (Search class). To be able to test code easily, to run searx code outside a web server, to filter the search query parameters with plugins more easily, etc...

Details :
- request.request_data contains request.form or request.args (initialize inside pre_request() function)
- Query class is renamed RawTextQuery
- SearchQuery class defines all search parameters
- get_search_query_from_webapp create a SearchQuery instance (basically the previous Search.__init__ code)
- Search class and SearchWithPlugins class takes a SearchQuery instance as class constructor parameter
- SearchWithPlugins class inherites from Search class, and run plugins
- A dedicated function search_with_plugins executes plugins to have a well define locals() (which is used by the plugins code).
- All plugins code is executed inside the try...except block (webapp.py, index function)
- advanced_search HTTP parameter value stays in webapp.py (it is only part of UI)
- multiple calls to result_container.get_ordered_results() doesn't compute the order multiple time (note : this method was call only once before)
- paging value is stored in the result_container class (compute in the extend method)
- test about engine.suspend_end_time is done during search method call (instead of __init__)
- check that the format parameter value is one of these : html, rss, json, rss (before the html value was assumed but some text formatting wasn't not done)
2016-11-02 14:22:16 +01:00
Noemi Vanyi aa227180e2 remove self info answers from pages after first one 2016-08-27 16:45:25 +02:00