diff --git a/README.md b/README.md index 0ba1c71..9a88f7f 100644 --- a/README.md +++ b/README.md @@ -13,28 +13,26 @@ | Clearnet | TOR | I2P | Country | |-|-|-|-| -| [search.femboy.hu](https://search.femboy.hu/) | [✅](http://search.cepyxplublbyw2f4axy4pyztfbxmf63lrt2c7uwv6wl4iixz53czload.onion/) | ❌ | 🇭🇺 HU (OFFICIAL INSTANCE) | -| [lx.vern.cc](https://lx.vern.cc/) | [✅](http://lx.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion/) | [✅](http://vernziqfqvweijfaacmwazohgpdo2bt2ib2jlupt2pwwu27bhgxq.b32.i2p/) | 🇺🇸 US | -| [search.sesu.cc](https://search.sesu.cc/) | [✅](http://search.swxoebbpeqiiixyhbuh3vbw53pdrmtbiaj2sqveol6kkn5rpapfi4aad.onion/) | [✅](http://lqbchqljxiwl3bbjt4vqe76luovk5ly6khqhg7mt5qcqfn6e4sbq.b32.i2p/) | 🇨🇱 CL | | [librex.zzls.xyz](https://librex.zzls.xyz/) | [✅](http://librex.zzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion/) | [✅](http://7huurwog32tny663wkglrhozfoyqyqmsuxjbd7dtudccx44awjda.b32.i2p) | 🇨🇱 CL | -| [librex.revvy.de](https://librex.revvy.de/) | [✅](http://librex.revvybrr6pvbx4n3j4475h4ghw4elqr4t5xo2vtd3gfpu2nrsnhh57id.onion/) | [✅](http://revekebotog64xrrammtsmjwtwlg3vqyzwdurzt2pu6botg4bejq.b32.i2p/) | 🇨🇦 CA | +| [librex.me](https://librex.me/) | [✅](http://librex.revvybrr6pvbx4n3j4475h4ghw4elqr4t5xo2vtd3gfpu2nrsnhh57id.onion/) | [✅](http://revekebotog64xrrammtsmjwtwlg3vqyzwdurzt2pu6botg4bejq.b32.i2p/) | 🇨🇦 CA | | [librex.mikata.ru](https://librex.mikata.ru/) | [✅](http://f7ssz7l3biu4fugwctfpcx4txg5yq4gqhrt473ledsuc3ivtd3omniid.onion/) | ❌ | 🇺🇸 US | | [search.milivojevic.in.rs](https://search.milivojevic.in.rs/) | [✅](http://librex2xsek6qnh2i4yufuzqjumfdwtw7io7omgmimpzna6llqudqzyd.onion/) | ❌ | 🇳🇱 NL | -| [search.ahwx.org](https://search.ahwx.org/) | [✅](http://fcnfg6avz45hqzwbneekq57u2mqbnwa7veyvjcc4dndqbatvkjlaj7yd.onion/) | ❌ | 🇳🇱 NL | +| [search.ahwx.org](https://search.ahwx.org/) | [✅](http://cosrpybbddzdfjquer3zfmb2h5avtacnctnbu4gucwocdb42s63gcqqd.onion/) | ❌ | 🇳🇱 NL | | [search.davidovski.xyz](https://search.davidovski.xyz/) | ❌ | ❌ | 🇬🇧 UK | | [search.madreyk.xyz](https://search.madreyk.xyz/) | ❌ | ❌ | 🇩🇪 DE | | [search.pabloferreiro.es](https://search.pabloferreiro.es/) | ❌ | ❌ | 🇩🇪 DE | -| [buscar.weblibre.org](https://buscar.weblibre.org/) | ❌ | ❌ | 🇨🇱 CL | | [librex.pufe.org](https://librex.pufe.org/) | ❌ | ❌ | :new_zealand: NZ | | [librex.ratakor.com](https://librex.ratakor.com/) | ❌ | ❌ | 🇫🇷 FR | | [search.tildevarsh.in](https://search.tildevarsh.in/) | ❌ | ❌ | 🇮🇳 IN | | [librex.myroware.eu](https://librex.myroware.eu/) | ❌ | ❌ | 🇩🇪 DE | -| [lx.drain.win](https://lx.drain.win/) | ❌ | ❌ | 🇸🇬 SG | | [librex.bloatcat.tk](https://librex.bloatcat.tk/) | ❌ | ❌ | 🇮🇸 IS | | [librex.retro-hax.net](https://librex.retro-hax.net/) | ❌ | ❌ | 🇩🇪 DE | | [search.funami.tech](https://search.funami.tech/) | ❌ | ❌ | 🇰🇷 KR | | [search.zeroish.xyz](https://search.zeroish.xyz/) | ❌| ❌ | 🇺🇸 US | | [librex.baczek.me](https://librex.baczek.me/) | ❌| ❌ | 🇵🇱 PL | +| [librex.yogeshlamichhane.com.np](https://librex.yogeshlamichhane.com.np/) | ❌| ❌ | 🇺🇸 US | +| [search.spaceint.fr](https://search.spaceint.fr/) | ❌ | ❌ | 🇩🇪 DE | +| [lx.benike.monster](https://lx.benike.monster/) | ❌ | ❌ | 🇩🇪 DE |
### Thanks rms diff --git a/config.php.example b/config.php.example index 3d69fd6..d53280e 100644 --- a/config.php.example +++ b/config.php.example @@ -7,6 +7,7 @@ // Google results will be in this language "google_language_site" => "", "google_language_results" => "", + "google_number_of_results" => 10, // You can set a language for results in wikipedia "wikipedia_language" => "en", @@ -31,12 +32,6 @@ "original_name" => "YouTube", "original_url" => "youtube.com" ), - "bibliogram" => array( - "instance_url" => "", - "project_url" => "https://git.sr.ht/~cadence/bibliogram-docs/tree/master/docs/Instances.md", - "original_name" => "Instagram", - "original_url" => "instagram.com" - ), "rimgo" => array( "instance_url" => "", "project_url" => "https://codeberg.org/video-prize-ranch/rimgo#instances", @@ -110,6 +105,18 @@ "project_url" => "https://github.com/httpjamesm/AnonymousOverflow#clearnet-instances", "original_name" => "StackOverflow", "original_url" => "stackoverflow.com" + ), + "suds" => array( + "instance_url" => "", + "project_url" => "https://git.vern.cc/cobra/Suds/src/branch/main/instances.json", + "original_name" => "Snopes", + "original_url" => "snopes.com" + ), + "biblioreads" => array( + "instance_url" => "", + "project_url" => "https://github.com/nesaku/BiblioReads#instances", + "original_name" => "Goodreads", + "original_url" => "goodreads.com" ) ), diff --git a/docker-compose.yml b/docker-compose.yml index 5ce8593..c9224aa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: "2.1" services: librex: - image: librex:latest + image: librex/librex:latest container_name: librex network_mode: bridge ports: diff --git a/docker/README.md b/docker/README.md index b7bc5d6..04f2088 100644 --- a/docker/README.md +++ b/docker/README.md @@ -107,7 +107,6 @@ This docker image was developed with high configurability in mind, so here is th | Variables | Default | Examples | Description | |:----------|:-------------|:---------|:------| | APP_INVIDIOUS | "" | string | Integration with external self-hosted apps, configure the desired host. | -| APP_BIBLIOGRAM | "" | string | Integration with external self-hosted apps, configure the desired host. | | APP_RIMGO | "" | string | Integration with external self-hosted apps, configure the desired host. | | APP_SCRIBE | "" | string | Integration with external self-hosted apps, configure the desired host. | | APP_LIBRARIAN | "" | string | Integration with external self-hosted apps, configure the desired host. | @@ -120,6 +119,8 @@ This docker image was developed with high configurability in mind, so here is th | APP_LIBREMDB | "" | string | Integration with external self-hosted apps, configure the desired host. | | APP_BREEZEWIKI | "" | string | Integration with external self-hosted apps, configure the desired host. | | APP_ANONYMOUS_OVERFLOW | "" | string | Integration with external self-hosted apps, configure the desired host. | +| APP_SUDS | "" | string | Integration with external self-hosted apps, configure the desired host. | +| APP_BIBLIOREADS | "" | string | Integration with external self-hosted apps, configure the desired host. |
diff --git a/docker/attributes.sh b/docker/attributes.sh index 664b2ce..26ca7a7 100755 --- a/docker/attributes.sh +++ b/docker/attributes.sh @@ -34,7 +34,6 @@ export CONFIG_WIKIPEDIA_LANGUAGE=${CONFIG_WIKIPEDIA_LANGUAGE:-${CONFIG_GOOGLE_LA # Supported apps integration configuration. These empty spaces can be set up using free hosts as pointers # A particular example is using the "https://yewtu.be" or a self-hosted host to integrate the invidious app to librex export APP_INVIDIOUS=${APP_INVIDIOUS:-""} -export APP_BIBLIOGRAM=${APP_BIBLIOGRAM:-""} export APP_RIMGO=${APP_RIMGO:-""} export APP_SCRIBE=${APP_SCRIBE:-""} export APP_LIBRARIAN=${APP_LIBRARIAN:-""} @@ -47,6 +46,8 @@ export APP_QUETRE=${APP_QUETRE:-""} export APP_LIBREMDB=${APP_LIBREMDB:-""} export APP_BREEZEWIKI=${APP_BREEZEWIKI:-""} export APP_ANONYMOUS_OVERFLOW=${APP_ANONYMOUS_OVERFLOW:-""} +export APP_SUDS=${APP_SUDS:-""} +export APP_BIBLIOREADS=${APP_BIBLIOREADS:-""} # GNU/Curl configurations. Leave 'CURLOPT_PROXY' blank whether you don't need to use a proxy for requests # Generally, a proxy is needed when your IP address is blocked by search engines in response to multiple requests within a short time frame. In these cases, it is recommended to use rotating proxies diff --git a/docker/php/config.php b/docker/php/config.php index a588745..3d0d8ea 100644 --- a/docker/php/config.php +++ b/docker/php/config.php @@ -18,12 +18,6 @@ "original_name" => "YouTube", "original_url" => "youtube.com" ), - "bibliogram" => array( - "instance_url" => "${APP_BIBLIOGRAM}", - "project_url" => "https://git.sr.ht/~cadence/bibliogram-docs/tree/master/docs/Instances.md", - "original_name" => "Instagram", - "original_url" => "instagram.com" - ), "rimgo" => array( "instance_url" => "${APP_RIMGO}", "project_url" => "https://codeberg.org/video-prize-ranch/rimgo#instances", @@ -97,6 +91,18 @@ "project_url" => "https://github.com/httpjamesm/AnonymousOverflow#clearnet-instances", "original_name" => "StackOverflow", "original_url" => "stackoverflow.com" + ), + "suds" => array( + "instance_url" => "${APP_SUDS}", + "project_url" => "https://git.vern.cc/cobra/Suds/src/branch/main/instances.json", + "original_name" => "Snopes", + "original_url" => "snopes.com" + ), + "biblioreads" => array( + "instance_url" => "${APP_BIBLIOREADS}", + "project_url" => "https://github.com/nesaku/BiblioReads#instances", + "original_name" => "Goodreads", + "original_url" => "goodreads.com" ) ), diff --git a/docker/php/php.dockerfile b/docker/php/php.dockerfile index b1b7b82..3252e0e 100644 --- a/docker/php/php.dockerfile +++ b/docker/php/php.dockerfile @@ -22,7 +22,6 @@ ENV CONFIG_BITTORRENT_TRACKERS="&tr=http://nyaa.tracker.wf:7777/announce&tr=udp: # Supported apps integration configuration. These empty spaces can be set up using free hosts as pointers # A particular example is using the "https://yewtu.be" or a self-hosted host to integrate the invidious app to librex ENV APP_INVIDIOUS="" -ENV APP_BIBLIOGRAM="" ENV APP_RIMGO="" ENV APP_SCRIBE="" ENV APP_LIBRARIAN="" @@ -35,6 +34,9 @@ ENV APP_QUETRE="" ENV APP_LIBREMDB="" ENV APP_BREEZEWIKI="" ENV APP_ANONYMOUS_OVERFLOW="" +ENV APP_SUDS="" +ENV APP_BIBLIOREADS="" + # GNU/Curl configurations. Leave 'CURLOPT_PROXY' blank whether you don't need to use a proxy for requests # Generally, a proxy is needed when your IP address is blocked by search engines in response to multiple requests within a short time frame. In these cases, it is recommended to use rotating proxies diff --git a/engines/bittorrent/sukebei.php b/engines/bittorrent/sukebei.php index 65fd177..61485cc 100644 --- a/engines/bittorrent/sukebei.php +++ b/engines/bittorrent/sukebei.php @@ -9,11 +9,21 @@ foreach($xpath->query("//tbody/tr") as $result) { - $name = $xpath->evaluate(".//td[@colspan='2']//a[not(contains(@class, 'comments'))]/@title", $result)[0]->textContent; + $name_node = $xpath->evaluate(".//td[@colspan='2']//a[not(contains(@class, 'comments'))]/@title", $result); + if ($name_node->length > 0) { + $name = $name_node[0]->textContent; + } else { + $name = ""; + } $centered = $xpath->evaluate(".//td[@class='text-center']", $result); - $magnet = $xpath->evaluate(".//a[2]/@href", $centered[0])[0]->textContent; - $magnet_without_tracker = explode("&tr=", $magnet)[0]; - $magnet = $magnet_without_tracker . $config->bittorent_trackers; + $magnet_node = $xpath->evaluate(".//a[2]/@href", $centered[0]); + if ($magnet_node->length > 0) { + $magnet = $magnet_node[0]->textContent; + $magnet_without_tracker = explode("&tr=", $magnet)[0]; + $magnet = $magnet_without_tracker . $config->bittorent_trackers; + } else { + $magnet = ""; + } $size = $centered[1]->textContent; $seeders = $centered[3]->textContent; $leechers = $centered[4]->textContent; @@ -29,7 +39,6 @@ ) ); } - return $results; } ?> diff --git a/engines/google/text.php b/engines/google/text.php index 56fb1ae..b18a504 100644 --- a/engines/google/text.php +++ b/engines/google/text.php @@ -10,23 +10,21 @@ $domain = $config->google_domain; $site_language = isset($_COOKIE["google_language_site"]) ? trim(htmlspecialchars($_COOKIE["google_language_site"])) : $config->google_language_site; $results_language = isset($_COOKIE["google_language_results"]) ? trim(htmlspecialchars($_COOKIE["google_language_results"])) : $config->google_language_results; + $number_of_results = isset($_COOKIE["google_number_of_results"]) ? trim(htmlspecialchars($_COOKIE["google_number_of_results"])) : $config->google_number_of_results; $url = "https://www.google.$domain/search?q=$query_encoded&start=$page"; if (3 > strlen($site_language) && 0 < strlen($site_language)) - { $url .= "&hl=$site_language"; - } if (3 > strlen($results_language) && 0 < strlen($results_language)) - { $url .= "&lr=lang_$results_language"; - } + + if (3 > strlen($number_of_results) && 0 < strlen($number_of_results)) + $url .= "&num=$number_of_results"; if (isset($_COOKIE["safe_search"])) - { $url .= "&safe=medium"; - } $google_ch = curl_init($url); curl_setopt_array($google_ch, $config->curl_settings); diff --git a/instances.json b/instances.json index edc8497..e710af1 100644 --- a/instances.json +++ b/instances.json @@ -1,23 +1,5 @@ { "instances": [ - { - "clearnet": "https://search.femboy.hu/", - "tor": "http://search.cepyxplublbyw2f4axy4pyztfbxmf63lrt2c7uwv6wl4iixz53czload.onion/", - "i2p": null, - "country": "HU" - }, - { - "clearnet": "https://lx.vern.cc/", - "tor": "http://lx.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion/", - "i2p": "http://vernziqfqvweijfaacmwazohgpdo2bt2ib2jlupt2pwwu27bhgxq.b32.i2p/", - "country": "US" - }, - { - "clearnet": "https://search.sesu.cc/", - "tor": "http://search.swxoebbpeqiiixyhbuh3vbw53pdrmtbiaj2sqveol6kkn5rpapfi4aad.onion/", - "i2p": "http://lqbchqljxiwl3bbjt4vqe76luovk5ly6khqhg7mt5qcqfn6e4sbq.b32.i2p/", - "country": "CL" - }, { "clearnet": "https://librex.zzls.xyz/", "tor": "http://librex.zzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion/", @@ -25,7 +7,7 @@ "country": "CL" }, { - "clearnet": "https://librex.revvy.de/", + "clearnet": "https://librex.me/", "tor": "http://librex.revvybrr6pvbx4n3j4475h4ghw4elqr4t5xo2vtd3gfpu2nrsnhh57id.onion/", "i2p": "http://revekebotog64xrrammtsmjwtwlg3vqyzwdurzt2pu6botg4bejq.b32.i2p/", "country": "CA" @@ -38,7 +20,7 @@ }, { "clearnet": "https://search.ahwx.org/", - "tor": "http://fcnfg6avz45hqzwbneekq57u2mqbnwa7veyvjcc4dndqbatvkjlaj7yd.onion/", + "tor": "http://cosrpybbddzdfjquer3zfmb2h5avtacnctnbu4gucwocdb42s63gcqqd.onion/", "i2p": null, "country": "NL" }, @@ -60,12 +42,6 @@ "i2p": null, "country": "DE" }, - { - "clearnet": "https://buscar.weblibre.org/", - "tor": null, - "i2p": null, - "country": "CL" - }, { "clearnet": "https://librex.pufe.org/", "tor": null, @@ -96,12 +72,6 @@ "i2p": null, "country": "DE" }, - { - "clearnet": "https://lx.drain.win/", - "tor": null, - "i2p": null, - "country": "SG" - }, { "clearnet": "https://librex.bloatcat.tk/", "tor": null, @@ -131,6 +101,24 @@ "tor": null, "i2p": null, "country": "PL" + }, + { + "clearnet": "https://librex.yogeshlamichhane.com.np/", + "tor": null, + "i2p": null, + "country": "US" + }, + { + "clearnet": "https://search.spaceint.fr/", + "tor": null, + "i2p": null, + "country": "DE" + }, + { + "clearnet": "https://lx.benike.monster/", + "tor": null, + "i2p": null, + "country": "DE" } ] } diff --git a/misc/header.php b/misc/header.php index 10a2435..36da4bf 100644 --- a/misc/header.php +++ b/misc/header.php @@ -6,7 +6,7 @@ - + \""" . ucfirst($category) . ""; + echo "\""" . ucfirst($category) . ""; } ?> diff --git a/settings.php b/settings.php index df150f6..fa41f3d 100644 --- a/settings.php +++ b/settings.php @@ -61,7 +61,10 @@ - "; + + + + "; if (isset($_COOKIE["theme"])) { @@ -114,6 +117,10 @@ echo isset($_COOKIE["google_language_results"]) ? htmlspecialchars($_COOKIE["google_language_results"]) : $config->google_language_results; ?>"> +
+ + google_number_of_results; ?>" > +
> diff --git a/static/css/catppuccin.css b/static/css/catppuccin.css new file mode 100644 index 0000000..92ba358 --- /dev/null +++ b/static/css/catppuccin.css @@ -0,0 +1,26 @@ +:root { + --main-bg: #1E1E2E; + --main-fg: #CDD6F4; + + --result-link-fg: #89B4FA; + --result-fg: #B4B3FE; + + --button-bg: #313244; + + --special-result-border: opacity 50; + --special-text-background: #44475A; + --special-text-color: #CDD6F4; + + --search-container-text-color: #CDD6F4; + --search-container-background-color: #313244; + --search-container-background-border: #B4BEFE; + + --search-form-background-color: #181825; + + --border: #B4B3FE; + + --footer-fg: #A6ADC8; + --footer-bg: #313244; + + color-scheme: dark; +} diff --git a/static/css/tokyo_night.css b/static/css/tokyo_night.css new file mode 100644 index 0000000..bd97a92 --- /dev/null +++ b/static/css/tokyo_night.css @@ -0,0 +1,26 @@ +:root { + --main-bg: #24283b; + --main-fg: #cfc9c2; + + --result-link-fg: #bb9af7; + --result-fg: #a2a08e; + + --button-bg: #343b58; + + --special-result-border: border 0; + --special-text-background: #1a1b26; + --special-text-color: #c0caf5; + + --search-container-text-color: #f2efd3; + --search-container-background-color: #565f89; + --search-container-background-border: #bb9af7; + + --search-form-background-color: #1a1b26; + + --border: #565f89; + + --footer-fg: #f2efd3; + --footer-bg: #1a1b26; + + color-scheme: dark; +} diff --git a/static/css/ubuntu.css b/static/css/ubuntu.css new file mode 100644 index 0000000..19b5147 --- /dev/null +++ b/static/css/ubuntu.css @@ -0,0 +1,26 @@ +:root { + --main-bg: #2C001E; + --main-fg: #FFFFFF; + + --result-link-fg: #84de32; + --result-fg: #a2a08e; + + --button-bg: #5E2750; + + --special-result-border: border 0; + --special-text-background: #333333; + --special-text-color: #FFFFFF; + + --search-container-text-color: #f2efd3; + --search-container-background-color: #77216F; + --search-container-background-border: #E95420; + + --search-form-background-color: #333333; + + --border: #77216F; + + --footer-fg: #f2efd3; + --footer-bg: #5E2750; + + color-scheme: dark; +}