Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tell visitors if the current instance is blocked #875

Open
cloudrac3r opened this issue Nov 5, 2019 · 3 comments
Open

Tell visitors if the current instance is blocked #875

cloudrac3r opened this issue Nov 5, 2019 · 3 comments
Labels

Comments

@cloudrac3r
Copy link

@cloudrac3r cloudrac3r commented Nov 5, 2019

It is possible for Invidious to know if it is blocked or not by examining the response it receives from YouTube. If a request failed because the instance is blocked, relevant information should be shown to the user.

The main way this would be displayed is as a more specific message on the error page.

Similarly, whether the request was blocked should be provided in API responses. This could either be designed as a custom message for the error key, or a separate key/value pair present in all API responses.

A field should also be added to /api/v1/stats to show whether any recent requests on this instance were blocked or not, to help automated processes decide if the instance is blocked or not without having to put extra load on it by requesting a video page. "Recent" could be as simple as "the latest one".

This will help users tell the difference between "the video URL is wrong", "the video was removed", and "this instance is blocked, so nothing is available right now".

Perhaps a page explaining how this blocking works should be created and linked in the error page, so that users that are unfamiliar with YouTube's recent automated request policies can understand what is happening. I would be willing to help write this article.

@omarroth omarroth added the enhancement label Nov 5, 2019
@omarroth

This comment has been minimized.

Copy link
Owner

@omarroth omarroth commented Nov 6, 2019

Added error message as part of 0e1d6aa.

@cloudrac3r

This comment has been minimized.

Copy link
Author

@cloudrac3r cloudrac3r commented Dec 14, 2019

From omarroth/instances.invidio.us#6:

And I just wanted to suggest to add a key to know if an instance is actually available or not (By available, I would like to also know if the instance is blocked by Google or not).

Elaboration: I think this should be implemented as a JSON API, either part of /api/v1/stats or perhaps its own endpoint, which displays the timestamp of that instance's most recent video request (e.g. 1576286344) and whether that request was blocked or not (true/false). This would allow automated tools to detect if an instance is blocked or not without having to put additional load on it with a /api/v1/videos request.

@Booteille

This comment has been minimized.

Copy link

@Booteille Booteille commented Jan 27, 2020

Hey.

Where are we regarding this issue? I didn't follow past discussions around Invidious.
Will an API endpoint be added?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.