cloudflare cdn fucks it up...

This commit is contained in:
unknown 2023-03-03 19:49:13 +01:00
parent 4d39de2d66
commit 6d1a72efa7
1 changed files with 2 additions and 2 deletions

View File

@ -1,8 +1,8 @@
const fetch = require('node-fetch') const fetch = require('node-fetch')
async function getInstance() { async function getInstance() {
const instances = await (await fetch('https://piped-instances.kavin.rocks/')).json() const instances = [await (await fetch('https://piped-instances.kavin.rocks/')).json()]
const list = instances.filter(i => i.cdn && i.name != "tokhmi.xyz" && i.name != "rivo.lol") const list = instances.filter(i => !i.cdn)
return (list[Math.floor(Math.random() * list.length)]).api_url return (list[Math.floor(Math.random() * list.length)]).api_url
} }