diff --git a/index.js b/index.js index 9e16c43..68e4d14 100644 --- a/index.js +++ b/index.js @@ -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") : "" diff --git a/instances.json b/instances.json index 23dd987..bc96a96 100644 --- a/instances.json +++ b/instances.json @@ -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