Browse Source

added breezewiki to the frontends, removed a dead intance and added a new one

hnhx 2 years ago
parent
commit
b96953bd20
6 changed files with 21 additions and 8 deletions
  1. 2 2
      .gitignore
  2. 1 1
      README.md
  3. 2 1
      config.php.example
  4. 2 2
      instances.json
  5. 12 1
      misc/tools.php
  6. 2 1
      settings.php

+ 2 - 2
.gitignore

@@ -1,2 +1,2 @@
-./config.php
-./opensearch.xml
+config.php
+opensearch.xml

+ 1 - 1
README.md

@@ -25,7 +25,7 @@
 | [buscar.weblibre.org](https://buscar.weblibre.org/) | ❌ | ❌ | 🇨🇱 CL |
 | [search.ahwx.org](https://search.ahwx.org/) | ❌ | ❌ | 🇳🇱 NL |
 | [librex.pufe.org](https://librex.pufe.org/) | ❌ | ❌ | :new_zealand: NZ |
-| [librex.kitscomputer.tk](https://librex.kitscomputer.tk/) | ❌ | ❌ | 🇺🇸 US |
+| [search.milivojevic.in.rs](https://search.milivojevic.in.rs/) | ❌ | ❌ | 🇳🇱 NL |
 <br>
 
 ### Thanks rms

+ 2 - 1
config.php.example

@@ -23,7 +23,8 @@
         "proxitok" => "", // tiktok
         "wikiless" => "", // wikipedia
         "quetre" => "", // quora
-        "libremdb" => "", // imdb
+        "libremdb" => "", // imdb,
+        "breezewiki" => "", // fandom
 
         /*
             To send requests trough a proxy uncomment CURLOPT_PROXY and CURLOPT_PROXYTYPE:

+ 2 - 2
instances.json

@@ -73,10 +73,10 @@
               "country": "NZ"
           },
           {
-              "clearnet": "https://librex.kitscomputer.tk/",
+              "clearnet": "https://search.milivojevic.in.rs/",
               "tor": null,
               "i2p": null,
-              "country": "US"
+              "country": "NL"
           }
     ]
 }

+ 12 - 1
misc/tools.php

@@ -37,11 +37,21 @@
                     $url =  $frontend . explode($original, $url)[1] . "?lang=" . $lang;
                 }
             }
+            else if (strpos($url, "fandom.com") !== false)
+            {
+                $fandom_split = explode(".", $url);
+                if (count($fandom_split) > 1)
+                {
+                    $wiki_name = explode("://", $fandom_split[0])[1];
+                    $url =  $frontend . "/" . $wiki_name . explode($original, $url)[1];
+                }
+            }
             else
             {
                 $url =  $frontend . explode($original, $url)[1];
             }
 
+
             return $url;
         }
 
@@ -61,7 +71,8 @@
             "tiktok.com" => "proxitok",
             "wikipedia.org" => "wikiless",
             "quora.com" => "quetre",
-            "imdb.com" => "libremdb"
+            "imdb.com" => "libremdb",
+            "fandom.com" => "breezewiki"
         );
 
         foreach($frontends as $original => $frontend)

+ 2 - 1
settings.php

@@ -87,7 +87,8 @@
                                 "proxitok" => array("https://github.com/pablouser1/ProxiTok/wiki/Public-instances", "TikTok"),
                                 "wikiless" => array("https://codeberg.org/orenom/wikiless", "Wikipedia"),
                                 "quetre" => array("https://github.com/zyachel/quetre", "Quora"),
-                                "libremdb" => array("https://github.com/zyachel/libremdb", "IMDb")
+                                "libremdb" => array("https://github.com/zyachel/libremdb", "IMDb"),
+                                "breezewiki" => array("https://gitdab.com/cadence/breezewiki", "Fandom")
                             );
                         
                            foreach($frontends as $frontend => $info)