people are unable to host their own okay instances...

This commit is contained in:
unknown 2023-03-10 17:09:46 +01:00
parent 2949b33286
commit 863ca93f6e
1 changed files with 4 additions and 3 deletions

View File

@ -1,9 +1,10 @@
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) // 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
return 'https://pipedapi.kavin.rocks'
} }
async function getVideoMetadata(instance, id) { async function getVideoMetadata(instance, id) {