diff --git a/README.md b/README.md
index 6bc78a6..0a3c1da 100644
--- a/README.md
+++ b/README.md
@@ -19,13 +19,13 @@
| [search.funami.tech](https://search.funami.tech/) | β | β | π°π· KR |
| [librex.catalyst.sx](https://librex.catalyst.sx/) | β | β | πΊπΈ US |
| [search.madreyk.xyz](https://search.madreyk.xyz/) | β | β | π©πͺ DE |
-| β | [β
](http://librex.so2mpiyfo4cje7bof5v52y3cvjyo2haxpqfvut4sr6gj2ul4mddx2jid.onion/) | β | ??? |
+| β | [β
](http://librex.so2mpiyfo4cje7bof5v52y3cvjyo2haxpqfvut4sr6gj2ul4mddx2jid.onion/) | β | ??? |
### About LibreX
-LibreX gives you results from Google, Qwant and popular torrent sites without spying on you.
+LibreX gives you results from Google, Brave, Qwant and popular torrent sites without spying on you.
If you would like to learn more about LibreX check out the [Wiki](https://github.com/hnhx/librex/wiki).
@@ -33,7 +33,7 @@ If you would like to learn more about LibreX check out the [Wiki](https://github
### Mirror
-In case GitHub would remove LibreX, you can access the source code via this git mirror
+You can access the source code via this git mirror
```
git clone https://git.beparanoid.de/librex
```
diff --git a/config.php.example b/config.php.example
index 6c42f62..5d90e18 100644
--- a/config.php.example
+++ b/config.php.example
@@ -10,16 +10,16 @@
"disable_bittorent_search" => false,
"bittorent_trackers" => "&tr=http%3A%2F%2Fnyaa.tracker.wf%3A7777%2Fannounce&tr=udp%3A%2F%2Fopen.stealth.si%3A80%2Fannounce&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce&tr=udp%3A%2F%2Fexodus.desync.com%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.torrent.eu.org%3A451%2Fannounce",
- /*
+ /*
Preset privacy friendly frontends for users, these can be overwritten by users in settings
e.g.: "invidious" => "https://yewtu.be",
*/
- "invidious" => "",
- "bibliogram" => "",
- "nitter" => "",
- "libreddit" => "",
- "proxitok" => "",
- "wikiless" => "",
+ "invidious" => "", // youtube
+ "bibliogram" => "", // instagram
+ "nitter" => "", // twitter
+ "libreddit" => "", // reddit
+ "proxitok" => "", // tiktok
+ "wikiless" => "", // wikipedia
/*
To send requests trough a proxy uncomment CURLOPT_PROXY and CURLOPT_PROXYTYPE:
@@ -45,7 +45,7 @@
CURLOPT_PROTOCOLS => CURLPROTO_HTTPS | CURLPROTO_HTTP,
CURLOPT_REDIR_PROTOCOLS => CURLPROTO_HTTPS | CURLPROTO_HTTP,
CURLOPT_MAXREDIRS => 5,
- CURLOPT_TIMEOUT => 8,
+ CURLOPT_TIMEOUT => 18,
CURLOPT_VERBOSE => false
)
diff --git a/engines/brave/video.php b/engines/brave/video.php
new file mode 100644
index 0000000..77fbc26
--- /dev/null
+++ b/engines/brave/video.php
@@ -0,0 +1,65 @@
+query("//div[@id='results']//div[@class='card']") as $result)
+ {
+ $url = $xpath->evaluate(".//a/@href", $result)[0]->textContent;
+ $title = $xpath->evaluate(".//div/@title", $result)[0]->textContent;
+ $views = $xpath->evaluate(".//div/@title", $result)[1]->textContent;
+ $date = $xpath->evaluate(".//div//span", $result)[0]->textContent;
+ $thumbnail_raw1 = $xpath->evaluate(".//div/@style", $result)[0]->textContent;
+ $thumbnail_raw2 = explode("url('", $thumbnail_raw1)[1];
+ $thumbnail = explode("'), url", $thumbnail_raw2)[0];
+
+ $url = check_for_privacy_frontend($url);
+
+ array_push($results,
+ array (
+ "title" => htmlspecialchars($title),
+ "url" => htmlspecialchars($url),
+ "base_url" => htmlspecialchars(get_base_url($url)),
+ "views" => htmlspecialchars($views),
+ "date" => htmlspecialchars($date),
+ "thumbnail" => htmlspecialchars($thumbnail)
+ )
+ );
+ }
+
+ return $results;
+ }
+
+ function print_video_results($results)
+ {
+ echo "