mirror of
https://git.bakhai.co.in/FbIN/LibreY.git
synced 2025-11-08 05:10:07 +05:30
Synced
fix(google): Use updated Google search endpoint via unixfox's research for SearXNG (b531406ce3/engines/text/google.php) Add initial Bing support Note, Bing obfuscates anchor links but it was trivial to determine. (f9f51c6b74) Update bing.php, decode URL Added urldecode to base64uri-decoded URL to enable proper parsing by get_base_url. (97c085cf95) Ignore Bing's relative links Updated parser for Bing links to ignore links that don't fit "results", such as relative links. Only non-obfuscated links and de-obfuscated absolute links will correctly make it through the parser. (7f12ad2950) https://github.com/Ahwxorg/LibreY/pull/218 https://github.com/Ahwxorg/LibreY/pull/215
This commit is contained in:
parent
7be73c5967
commit
747e827fef
3 changed files with 125 additions and 7 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
function get_engines() {
|
||||
return array("google", "duckduckgo", "brave", "yandex", "ecosia", "mojeek");
|
||||
return array("google", "duckduckgo", "brave", "yandex", "ecosia", "mojeek", "bing");
|
||||
}
|
||||
|
||||
class TextSearch extends EngineRequest {
|
||||
|
|
@ -88,6 +88,11 @@
|
|||
return new MojeekSearchRequest($opts, $mh);
|
||||
}
|
||||
|
||||
if ($engine == "bing") {
|
||||
require_once "engines/text/bing.php";
|
||||
return new BingSearchRequest($opts, $mh);
|
||||
}
|
||||
|
||||
// if an invalid engine is selected, don't give any results
|
||||
return null;
|
||||
}
|
||||
|
|
@ -217,4 +222,4 @@
|
|||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue