Jump to content

Invidious - open source Youtube frontend


Nisteo
 Share

Recommended Posts

Quote

Invidious is a free and open-source alternative frontend to YouTube. It is available as a Docker container, or from the GitHub master branch. It is intended to be used as a lightweight and "privacy-respecting" alternative to the official YouTube website. Invidious does not use the official YouTube API, but scrapes the website for video and metadata such as likes and views. This is done intentionally to decrease the amount of data shared with Google. The web-scraping tool is called the Invidious Developer API.

Wiki page: https://en.wikipedia.org/wiki/Invidious

Website: https://invidious.io/

API docs: https://docs.invidious.io/api/

 

By sending requests to Invidious API, you can get various information about YouTube videos, such as title, description, subtitles, available formats, direct links, and much more.

 

#include "JSON.au3"

;URL for sorted JSON list of API instances
Const $INVAPI_INSTANCE_LIST_URL = "https://api.invidious.io/instances.json?sort_by=type,api,users"

;Get list of API instances
$sResponse = BinaryToString(InetRead($INVAPI_INSTANCE_LIST_URL))

;Parse response and get first URL from list
$sFirstInstanceURL = (_JSON_Parse($sResponse)[0])[1].uri

;API request
Const $TEST_YOUTUBE_VIDEO_ID = "aqz-KE-bpKQ"
$sResponse = BinaryToString(InetRead($sFirstInstanceURL & "/api/v1/videos/" & $TEST_YOUTUBE_VIDEO_ID & "?fields=videoId,title,description"))

;Parse response and output it
$JsonData = _JSON_Parse($sResponse)
MsgBox(64, "Info", _
    "Video ID: <" & ($JsonData).videoId & ">" & @CRLF & @CRLF & _
    "Title: <" & ($JsonData).title & ">" & @CRLF & @CRLF & _
    "Description: <" & ($JsonData).description & ">")

invidious_response.png.1b66afda92cd19a301715935e4232ea5.png

 

For this example I used AspirinJunkie's JSON UDF.

 

Edited by Nisteo
Link to comment
Share on other sites

  • Nisteo changed the title to Invidious - open source Youtube frontend

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...