fix output

This commit is contained in:
Artemy 2024-05-22 17:52:29 +03:00
parent 15494eddbd
commit 4863c4f75e
2 changed files with 22 additions and 18 deletions

View file

@ -21,21 +21,29 @@ async function run() {
instances.map(async (instance) => {
if (typeof instance === "string") {
const config_url = instance + "/configuration/json";
let config = await fetch(config_url).then((res) => res.json());
try {
await fetch(config_url).then((res) => res.json());
return `- <${instance}> ${badge(
config_url,
"version",
"version"
)} ${badge(config_url, "protocol", "protocol")} ${badge(
config_url,
"searx",
"third_party.searx_url"
)} ${badge(config_url, "webder", "third_party.webder_url")} ${badge(
config_url,
"image compression",
"proxy.img_compress"
)}`;
return `- <${instance}> ${badge(
config_url,
"version",
"version"
)} ${badge(config_url, "protocol", "protocol")} ${badge(
config_url,
"searx",
"third_party.searx_url"
)} ${badge(
config_url,
"webder",
"third_party.webder_url"
)} ${badge(
config_url,
"image compression",
"proxy.img_compress"
)}`;
} catch {
return `- <${instance}>`;
}
} else {
return `- <${instance.baseUrl}> ${
instance.search ? static("search", "enabled") : ""

View file

@ -1,24 +1,20 @@
[
{
"name": "Official 1",
"baseUrl": "https://txt.dc09.ru",
"HTTPS": true,
"search": true
},
{
"name": "Official 2",
"baseUrl": "https://txt.artegoser.ru",
"HTTPS": true,
"search": true
},
{
"name": "Bloatcat",
"baseUrl": "https://txt.bloat.cat",
"HTTPS": true,
"search": true
},
{
"name": "Clovius club",
"baseUrl": "https://txt.clovius.club",
"HTTPS": true,
"search": true