cloudflare cdn fucks it up...
This commit is contained in:
parent
4d39de2d66
commit
6d1a72efa7
|
@ -1,8 +1,8 @@
|
|||
const fetch = require('node-fetch')
|
||||
|
||||
async function getInstance() {
|
||||
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 instances = [await (await fetch('https://piped-instances.kavin.rocks/')).json()]
|
||||
const list = instances.filter(i => !i.cdn)
|
||||
return (list[Math.floor(Math.random() * list.length)]).api_url
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue