cloudflare cdn fucks it up...
This commit is contained in:
parent
4d39de2d66
commit
6d1a72efa7
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue