pub / serci

Search the web with !keywords
git clone https://src.jayvii.de/pub/serci.git
Home | Log | Files | Exports | Refs | README | RSS

commit c4b4156a46b3d07d93d009578e4d3d2ae0f9dbf2
parent cb1af5d5613948423633fa47327bf7d70c34cdd7
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Mon, 25 May 2026 14:32:23 +0200

Revert "feat: add option to parse metager token"

This reverts commit b6c9119aefa07c130e6568a81f4fc590b030087b.

Diffstat:
MREADME.md | 12++----------
Mconfig/config.php | 10++++------
Mindex.php | 4++--
3 files changed, 8 insertions(+), 18 deletions(-)

diff --git a/README.md b/README.md @@ -36,16 +36,8 @@ is geared towards privacy and data minimalism. However, you can simply host serĉi yourself any time and configure your own favorite search engines and `!keywords`. -If you think there are `!keywords` that other people would benefit from, feel -free to contribute! - -*Note:* In the case of the paid search engine Metager, which requires -a `key` or `token` to be used, you can forward this token through -serĉi with the `%opt` replacement, e.g.: `!metager:key=abc` for example -in private browsing mode. For private mode browser such as Firefox -Klar, you could then apply the search URL in the settings like so: -`https://search.example.com/?fallback=metagerweb&q=!metager:key=abc%s`. -**BEWARE: the serĉi host is technically able to read this information as well!** +If you think there are `!keywords` that other people would benefit from, feel free +to contribute! ### How can I use serĉi? diff --git a/config/config.php b/config/config.php @@ -291,20 +291,18 @@ $searches = array( "metagerweb" => array( "name" => "MetaGer", "website" => "https://metager.de/?focus=web", - "query" => "https://metager.de/meta/meta.ger3?%opt&focus=web&eingabe=%s", - "default_opts" => "", // may be used with the "key=ABC" parameter + "query" => "https://metager.de/meta/meta.ger3?focus=web&eingabe=%s", "categories" => array("web", "meta", "subscription"), "keywords" => array("metagerweb", "metager", "meta", "mg", "metaweb"), - "description" => "A metasearch engine focused on protecting privacy, hosted as a cooperation between the German NGO SUMA-EV and the University of Hannover. Since August 2024 only available through a paid model. You can apply your key cookie-less with the !metagerweb:key=abc option" + "description" => "A metasearch engine focused on protecting privacy, hosted as a cooperation between the German NGO SUMA-EV and the University of Hannover. Since August 2024 only available through a paid model" ), "metagerimg" => array( "name" => "MetaGer Images", "website" => "https://metager.de/?focus=bilder", - "query" => "https://metager.de/meta/meta.ger3?%opt&focus=bilder&eingabe=%s", - "default_opts" => "", // may be used with the "key=ABC" parameter + "query" => "https://metager.de/meta/meta.ger3?focus=bilder&eingabe=%s", "categories" => array("img", "meta", "foss", "subscription"), "keywords" => array("metagerimg", "metaimg"), - "description" => "A metasearch engine focused on protecting privacy, hosted as a cooperation between the German NGO SUMA-EV and the University of Hannover. Since August 2024 only available through a paid model. . You can apply your key cookie-less with the !metagerimg:key=abc option" + "description" => "A metasearch engine focused on protecting privacy, hosted as a cooperation between the German NGO SUMA-EV and the University of Hannover. Since August 2024 only available through a paid model" ), "metagermap" => array( "name" => "MetaGer Maps", diff --git a/index.php b/index.php @@ -38,9 +38,9 @@ if (strlen($query) > 0) { - /* Find keywords (only last one is considered) */ + /* Find keywords (only first one is considered) */ $keyword = preg_replace( - '/^.*\!([A-Za-z0-9_\-\.]+).*?$/', + '/^.*?\!([A-Za-z0-9_\-\.]+).*$/', '${1}', $query );