1 XMR = $338.87
Current view: Classic | Threads
Sort by: New | Tips

Direct Invidious.io url download with pytubefix

Cnix
N/A (0)
Posts: 1
Earned: 0 XMR
Tipped: 0 XMR
For those who don't know invidious.io, it's a free, open-source, and privacy-focused front-end for YouTube.
Invidious allows users to access YouTube content without the need to interact with Google's servers directly, ad-free and allowing direct video downloads.
I'm used to download my YouTube content with yt-dlp or pytubefix and was wondering if it was possible to use Invidious urls directly. While Invidious allows direct downloads, yt-dlp and pytubefix offer more audio and video options. So, I tested both, and it works fine with pytubefix.
I share here a python script. You'll find more examples on the pytubefix GitHub.

from pytubefix import YouTube
url = input("YouTube url: ")
yt = YouTube(url)
print("Available itag values:")
print(yt.streams)
itag = input("Your itag choice : ")
stream = yt.streams.get_by_itag(itag)
print(f"Downloading: {yt.title}...")
stream.download()
print("Download completed!")
Tip Cnix
QR Code 88JxcYVMfP3i3Di25TB7DHVYiUkfXoBupjnJFkPHBEPC1PqEp3MtnMnhBzzKDU2PMnhpchanLgNs752TSrLnhhM7FEoB2af
Publish Tip to Cnix

Please login to publish your tip

Page:
1
You must login in order to publish a post