git-bruh/invidious-viewer

Choose a random invidio.us instance

2br-2b opened this issue · 3 comments

Instead of defaulting to the https://invidious.snopyta.org instance, you could choose a random instance and redirect to that. There's currently a list at https://instances.invidio.us/ that can be chosen from. I could implement this, but want to wait for feedback. We'd also want to check if the instance returns an error and, if so, choose another instance from the list.

I chose the snopyta instance as it seemed to be the most reliable one after the main instance, and yes i had been thinking of making the program choose another instance if the default one is down, so it'll try fetching the URLs from 3-4 instances before finally exiting if all of them fail. However, most of the other instances don't provide all of the API endpoints used here. The only other suitable instance that provides all the endpoints seems to be https://invidious.13ad.de, so i think that we can still keep https://invidious.snopyta.org as the default and fall back to this one.

I've implemented this somewhat in 1c40f9d

Mostly done in b58611a