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) => { instances.map(async (instance) => {
if (typeof instance === "string") { if (typeof instance === "string") {
const config_url = instance + "/configuration/json"; 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( return `- <${instance}> ${badge(
config_url, config_url,
"version", "version",
"version" "version"
)} ${badge(config_url, "protocol", "protocol")} ${badge( )} ${badge(config_url, "protocol", "protocol")} ${badge(
config_url, config_url,
"searx", "searx",
"third_party.searx_url" "third_party.searx_url"
)} ${badge(config_url, "webder", "third_party.webder_url")} ${badge( )} ${badge(
config_url, config_url,
"image compression", "webder",
"proxy.img_compress" "third_party.webder_url"
)}`; )} ${badge(
config_url,
"image compression",
"proxy.img_compress"
)}`;
} catch {
return `- <${instance}>`;
}
} else { } else {
return `- <${instance.baseUrl}> ${ return `- <${instance.baseUrl}> ${
instance.search ? static("search", "enabled") : "" instance.search ? static("search", "enabled") : ""

View file

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