mirror of
https://github.com/hnhx/librex.git
synced 2025-04-29 05:59:27 -04:00
added more frontends, removed some dead instances, fixed an issue regarding thepiratebay
This commit is contained in:
parent
d6e9248637
commit
d6635f537c
13 changed files with 32 additions and 23 deletions
|
@ -23,9 +23,6 @@
|
|||
| [search.ahwx.org](https://search.ahwx.org/) | ❌ | ❌ | 🇳🇱 NL |
|
||||
| [pufe.org](https://pufe.org/) | ❌ | ❌ | :new_zealand: NZ |
|
||||
| [librex.kitscomputer.tk](https://librex.kitscomputer.tk/) | ❌ | ❌ | 🇺🇸 US |
|
||||
| [librex.smlan.dev](https://librex.smlan.dev/) | ❌ | ❌ | 🇭🇺 HU |
|
||||
| [linxer.org](https://linxer.org/search/) | ❌ | ❌ | 🏳️ DYN (FORK) |
|
||||
|
||||
<br>
|
||||
|
||||
### About LibreX
|
||||
|
|
2
api.php
2
api.php
|
@ -8,7 +8,7 @@
|
|||
<br/>
|
||||
<p>\"q\" is the keyword</p>
|
||||
<p>\"p\" is the result page (the first page is 0)</p>
|
||||
<p>\"t\" is the search type (0=text, 1=image, 2=video, 3=torrent)</p>
|
||||
<p>\"t\" is the search type (0=text, 1=image, 2=video, 3=torrent, 4=tor)</p>
|
||||
<br/>
|
||||
<p>The results are going to be in JSON format.</p>
|
||||
<p>The API supports both POST and GET requests.</p>";
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
"libreddit" => "", // reddit
|
||||
"proxitok" => "", // tiktok
|
||||
"wikiless" => "", // wikipedia
|
||||
"quetre" => "", // quora
|
||||
"libremdb" => "", // imdb
|
||||
|
||||
/*
|
||||
To send requests trough a proxy uncomment CURLOPT_PROXY and CURLOPT_PROXYTYPE:
|
||||
|
@ -41,7 +43,7 @@
|
|||
// CURLOPT_PROXYTYPE => CURLPROXY_HTTP,
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_ENCODING => "",
|
||||
CURLOPT_USERAGENT => "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36",
|
||||
CURLOPT_USERAGENT => "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36",
|
||||
CURLOPT_IPRESOLVE => CURL_IPRESOLVE_V4,
|
||||
CURLOPT_CUSTOMREQUEST => "GET",
|
||||
CURLOPT_PROTOCOLS => CURLPROTO_HTTPS | CURLPROTO_HTTP,
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
array_push($results,
|
||||
array (
|
||||
"title" => htmlspecialchars($title),
|
||||
"title" => $title ? htmlspecialchars($title) : "No description provided",
|
||||
"url" => htmlspecialchars($url),
|
||||
"base_url" => htmlspecialchars(get_base_url($url)),
|
||||
"description" => htmlspecialchars($description)
|
||||
|
|
|
@ -8,9 +8,13 @@
|
|||
$results = array();
|
||||
$json_response = json_decode($response, true);
|
||||
|
||||
if (empty($json_response))
|
||||
{
|
||||
return $results;
|
||||
}
|
||||
|
||||
foreach ($json_response as $response)
|
||||
{
|
||||
|
||||
$size = human_filesize($response["size"]);
|
||||
$hash = $response["info_hash"];
|
||||
$name = $response["name"];
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
curl_setopt_array($google_ch, $config->curl_settings);
|
||||
curl_multi_add_handle($mh, $google_ch);
|
||||
|
||||
$special_search = check_for_special_search($query);
|
||||
$special_search = $page ? 0 : check_for_special_search($query);
|
||||
$special_ch = null;
|
||||
$url = null;
|
||||
if ($special_search != 0)
|
||||
|
|
|
@ -47,18 +47,6 @@
|
|||
"tor": null,
|
||||
"i2p": null,
|
||||
"country": "US"
|
||||
},
|
||||
{
|
||||
"clearnet": "https://librex.smlan.dev/",
|
||||
"tor": null,
|
||||
"i2p": null,
|
||||
"country": "HU"
|
||||
},
|
||||
{
|
||||
"clearnet": "https://linxer.org/search/",
|
||||
"tor": null,
|
||||
"i2p": null,
|
||||
"country": "DYN"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta charset="UTF-8"/>
|
||||
<meta name="description" content="A privacy respecting meta search engine."/>
|
||||
<meta name="referrer" content="no-referrer"/>
|
||||
<link rel="stylesheet" type="text/css" href="static/css/styles.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="static/css/styles_min.css"/>
|
||||
<link title="LibreX search" type="application/opensearchdescription+xml" href="/opensearch.xml?method=POST" rel="search"/>
|
||||
<link rel="stylesheet" type="text/css" href="<?php
|
||||
echo "static/css/";
|
||||
|
|
|
@ -47,7 +47,9 @@
|
|||
"twitter.com" => "nitter",
|
||||
"reddit.com" => "libreddit",
|
||||
"tiktok.com" => "proxitok",
|
||||
"wikipedia.org" => "wikiless"
|
||||
"wikipedia.org" => "wikiless",
|
||||
"quora.com" => "quetre",
|
||||
"imdb.com" => "libremdb"
|
||||
);
|
||||
|
||||
foreach($frontends as $original => $frontend)
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
<button name="t" value="1"><img src="static/images/image_result.png" alt="image result" />Images</button>
|
||||
<button name="t" value="2"><img src="static/images/video_result.png" alt="video result" />Videos</button>
|
||||
<button name="t" value="3"><img src="static/images/torrent_result.png" alt="torrent result" />Torrents</button>
|
||||
<button name="t" value="4"><img src="static/images/hidden_service_result.png" alt="hidden service result" />Hidden services</button>
|
||||
<button name="t" value="4"><img src="static/images/tor_result.png" alt="tor result" />Tor</button>
|
||||
</div>
|
||||
<hr>
|
||||
</form>
|
||||
|
|
14
settings.php
14
settings.php
|
@ -119,6 +119,20 @@
|
|||
<?php echo isset($_COOKIE["wikiless"]) ? htmlspecialchars($_COOKIE["wikiless"]) : "\"$config->wikiless\""; ?>
|
||||
>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a for="quetre" href="https://github.com/zyachel/quetre" target="_blank">Quetre</a>
|
||||
<input type="text" name="quetre" placeholder="Replace Quora" value=
|
||||
<?php echo isset($_COOKIE["quetre"]) ? htmlspecialchars($_COOKIE["quetre"]) : "\"$config->quetre\""; ?>
|
||||
>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a for="libremdb" href="https://github.com/zyachel/libremdb" target="_blank">Libremdb</a>
|
||||
<input type="text" name="libremdb" placeholder="Replace IMDb" value=
|
||||
<?php echo isset($_COOKIE["libremdb"]) ? htmlspecialchars($_COOKIE["libremdb"]) : "\"$config->libremdb\""; ?>
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label>Disable frontends</label>
|
||||
|
|
2
static/css/styles_min.css
Normal file
2
static/css/styles_min.css
Normal file
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 370 B After Width: | Height: | Size: 370 B |
Loading…
Add table
Reference in a new issue