Code Monkey home page Code Monkey logo

instances-api's Introduction

Build Status

Status page for Invidious instances, sourced from the documentation.

Installation

$ git clone https://github.com/iv-org/instances-api
$ cd instances-api
$ shards install
$ crystal build src/instances.cr --release

Usage

$ ./instances -h
    -b HOST, --bind HOST             Host to bind (defaults to 0.0.0.0)
    -p PORT, --port PORT             Port to listen for connections (defaults to 3000)
    -s, --ssl                        Enables SSL
    --ssl-key-file FILE              SSL key file
    --ssl-cert-file FILE             SSL certificate file
    -h, --help                       Shows this help

Contributing

  1. Fork it (https://github.com/iv-org/instances-api/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

instances-api's People

Contributors

azhao12345 avatar cloudrac3r avatar hackerncoder avatar omarroth avatar perflyst avatar samantazfox avatar thefrenchghosty avatar unixfox avatar xrealneon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

instances-api's Issues

Instances with API call support

Is there a way to know whether an instance supports/accepts API calls before making the actual call? As an example, I used to use invidious.snopyta.org, but then it started blocking API calls, replying with 403.
Maybe it's me who's doing something wrong, I'd also like to know if that's the case.

And to make it clear, I'm looking for a programatic way, maybe through api.invidious.io/instances.json?

Sorting by health doesn't work

Hello,

When retrieving the instances JSON with ?sort_by=health, the server returns 500 with Cast from Float64 to String failed, at /usr/share/crystal/src/json/any.cr:250:5:250. Same error occurs after clicking on "health" on the instances table.

This started happening just today (22.04.)

Status of Stats Monitor

Is there any plan to revive the monitor data previously provided by the api? Currently instances.json is returning null on monitor:

... "type": "https",
"uri": "https:// yewtu. be",
"monitor": null ...

where as previously it provided information like "success":

... monitor: {
monitorId: 782758961,
createdAt: 1558969602,
statusClass: "success", ...

I have removed the criteria from my response parsing, but would like to know if I should make it permanent

Note: Originally opened in main issues list and moved per request.

Stricter CORS detection

Hello! There's an issue I'm having with CORS while developing my project

Now, I'm not an expert on CORS, but I think this is the issue:

Most browsers (Firefox and Chromium-based ones afaik) does not only check for Access-Control-Allow-Origin but a few more headers while doing a CORS preflight request:

  • Access-Control-Allow-Methods
  • Access-Control-Allow-Headers (probably optional)

I propose that instances-api checks for the Access-Control-Allow-Methods header while checking if an instance has CORS enabled.

Should be a one liner:
https://github.com/iv-org/instances-api/blob/master/src/instances.cr#L79

API: Adding filters for CORS headers

Can you add a filter argument to the API that I can filter out instances that don't have CORS set to *?
Or a filter for instances that allow the usage of the API.

Sort by type as default

Currently onion and https instances are mixed
https instances should be at the top of the instance list

[Enhancement] Show speed of public instances

Is your enhancement request related to a problem? Please describe.

https://redirect.invidious.io/ lists public instances of the site sorted by health but even sites with 100% health can sometimes be very slow compared to other instances. Even if you select the top instance you can end up with a slow one.

Describe the solution you'd like

I wish it would sort by health and speed of the site. There should be another column indicating how fast the site runs and how well it plays and loads videos. Some instances take longer than others to load videos. Health only seems to refer to how little the site crashes (?).

Describe alternatives you've considered

Let the user have to test all kinds of instances before they might find one that they find fast enough. Personally I remember yewtu.be to have an acceptable speed so I usually choose that but there might be better ones.

[Enhancement] do not display sites as online/100% health if sites "Can't load the video on this Invidious instance"

Trying to open YT video opens a list of proxies where one is yt.drgnz.club displayed as 100% health, yet it is false because it is not working, because that site https://yt.drgnz.club/watch?v=abcdef says:

Can't load the video on this Invidious instance. YouTube is currently trying to block Invidious instances. Click here for more info about the issue.

Please do not show instances which has this "issue" and can not load the video (currently). User is only mislead by the 100% health wasting the time.

Setup CI

Invidious CI recently moved from Travis to Github Actions for CI.

This project would also benefit from CI (using the Github Actions too).

The file should be pretty similar to the one used in Invidious since it's also Crystal.

@saltycrys since you're the one that did the Invidious CI, you might be interested in doing that.

[Feature request] Full country names in the instances api table

I am referring to the table found here:
https://api.invidious.io/
But it would be nice to also have this feature in this list: https://docs.invidious.io/instances/

What I mean is that full country names should be accessible to people who are searching for instances, as it is more convenient than manually looking up each country code (or being good at recognizing flags). This could be done by either adding the full name as a row in the table, or as a hover tooltip when hovering over a cell in the location column.

Cache results from uptime.invidio.us

I sometimes get an empty page from instances.invidio.us.
I guess it's because sometimes, uptime.invidio.us time out.

To avoid to break everything when such cases happen, I suggest to cache good results from uptime.invidio.us for some times (and invalidate the cache after some minutes if we get good results again).

That would also reduce the number of calls made on the uptime server since it should become more and more used by third parties.

Status page broken?

Hi, I wrote a fork of Privacy Redirect that uses your API to retrieve only working instances of Invidious.

Lately I've noticed redirects no longer work, and the cause seems to be that the UptimeRobot status page that the API requests is broken (here and here).

Do you know what's causing this, and will it get fixed?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.