squid-dl is a massively parallel yt-dlp-based YouTube downloader.

Related tags

Downloadersquid-dl
Overview

squid-dl logo

squid-dl

Code style: black License: MIT

squid-dl is a massively parallel yt-dlp-based YouTube downloader.

Installation

Run the setup.py, which will install squid-dl and its two dependencies: linode-cli and yt-dlp.

$ python3 setup.py install

Linode Setup

If you want to use the Linode SOCKS proxy feature, be sure to configure the linode-cli first:

$ linode-cli configure --token

Follow the onscreen instructions and be sure to set sensible defaults. The default region for new Linodes that you pick here is where your proxies will live. For more information, see this page on Linode's website.

Usage

To download a playlist, first fetch its metadata with squidson:

(.venv) $ squidson 'https://www.youtube.com/playlist?list=PLhI42_YpLVHvYqvjniSp7lhAM55K4fllO'
[youtube:tab] PLhI42_YpLVHvYqvjniSp7lhAM55K4fllO: Downloading webpage
[youtube:tab] PLhI42_YpLVHvYqvjniSp7lhAM55K4fllO: Downloading API JSON with unavailable videos
[download] Downloading playlist: Programming
[youtube:tab] playlist Programming: Downloading 12 videos
[download] Downloading video 1 of 12
[youtube] Wp9XD5FKZ2c: Downloading webpage
[youtube] Wp9XD5FKZ2c: Downloading android player API JSON
...
[download] Downloading video 12 of 12
[youtube] CIpfoMKqPAg: Downloading webpage
[youtube] CIpfoMKqPAg: Downloading android player API JSON
[youtube] CIpfoMKqPAg: Downloading MPD manifest
[youtube] CIpfoMKqPAg: Downloading MPD manifest
[download] Finished downloading playlist: Programming
[INFO]: Writing JSON-ified playlist info_dict to "Programming.json"

Now that you have the playlist .json file, you can download it with squid-dl. Use the -n flag to tell squid-dl how many workers you'd like to spawn downloading videos at once (the default is 8 workers). In this 12-video playlist example, we'll spawn 12 workers:

(.venv) $ squid-dl -n 12 Programming.json

[INFO]: Starting squid-dl...
[INFO]: saving videos to "Programming" directory

...
[download] Download completed
[download] Download completed
[download] Download completed
[INFO]: Worker 80214 done...
[INFO]: Worker 80319 done...
[download] Download completed
[INFO]: Worker 80150 done...
[INFO]: Worker 80248 done...
[download] Download completed
[INFO]: Worker 80219 done...
[INFO]: Worker 80109 done...
[INFO]: Worker 80341 done...
[download] Download completed
[INFO]: Worker 80193 done...
[download] Download completed
[INFO]: Worker 80117 done...
[INFO]: All done!

For more information see the built-in help by running squid-dl -h.

Linode Proxying

With the -L option, you can run each worker through its own Linode-powered SSH-tunneled SOCKSv5 proxy! squid-dl will make an temporary SSH key in the current working directory and then get to work spinning up Linodes and downloading your videos:

(.venv) [email protected]:~/butter/youtube/btr$ squid-dl -L Mem.json

[INFO]: Creating SSH key for Linode proxying...
Generating public/private rsa key pair.
Your identification has been saved in /home/anon/fuse/butter-anon/youtube/btr/proxy
_key
Your public key has been saved in /home/anon/fuse/butter-anon/youtube/btr/proxy_key
.pub
The key fingerprint is:
SHA256:cSns+aK0l7xS+fRSXRdqmc5DXkT5pIQsDV8/Ql526vg [email protected]
The key's randomart image is:
+---[RSA 3072]----+
|          .+ oo+o|
|       .  .o*.+*o|
|        + o..+*++|
|       . =   Oo.=|
|        S.  B.o..|
|        o.. .*.  |
|      .o.+.o  E  |
|     ..o+.o .    |
|      oo.. .     |
+----[SHA256]-----+

[INFO]: Starting squid-dl...
[INFO]: saving videos to "Mems" directory
[INFO]: Created Linode 30970792.
[INFO]: Waiting for Linodes to come online...........................

[INFO]: Starting proxy on port 1337 with Linode 30970792
Warning: Permanently added '45.79.47.110' (ED25519) to the list of known hosts.
[INFO]: SOCKS validation succeeded on port 1337 from ID 30970792
[youtube] fIdfGtG7Isg: Downloading android player API JSON
[youtube] fIdfGtG7Isg: Downloading iframe API JS
[youtube] fIdfGtG7Isg: Downloading player 03869671
[youtube] fIdfGtG7Isg: Downloading web player API JSON
[youtube] fIdfGtG7Isg: Downloading MPD manifest
[youtube] fIdfGtG7Isg: Downloading MPD manifest
[youtube] fIdfGtG7Isg: Downloading initial data API JSON
[info] fIdfGtG7Isg: Downloading 1 format(s): 22
[info] Downloading video thumbnail ...
[info] Writing video thumbnail to: Plankton goes to an anime convention [fIdfGtG7Is
g].webp
[download] Destination: Plankton goes to an anime convention [fIdfGtG7Isg].mp4
[download] Download completed
[INFO]: Cleaning up worker 83832's exclusive proxy
[CLEANUP]: Deleted Linode 30970792.
[INFO]: Worker 83832 done...
[INFO]: All done!
[CLEANUP]: Deleting Linode proxies...

Bugs

If you encounter any issues running squid-dl, please create an issue on GitHub.

This software has only tested on Linux so far (patches welcome).

Contributing

Submit your patches as GitHub pull requests.

Contact

Feel free to holler at me on #squid-dl on Libera.chat.

Style notes

I am an 80 column stickler. I run all Python code in this repository through black -l 80.

Owner
tuxlovesyou
Lover of all things Linux and Unix
tuxlovesyou
A simple Python +3.x script to download videos from Facebook.

Facebook Video Downloader A simple Python +3.x script to download videos from Facebook posts

Kerolos Atef Saber 1 Dec 03, 2021
A small distributed download manager to help bypass device-specific bandwidth limitations.

Distributed Download Manager A small distributed download manager to help bypass device-specific bandwidth limitations. Architecture The download mana

Anand Balaji 3 Sep 23, 2022
Download all games from a public Itch.io Game Jam

Itch Jam Downloader Downloads all games from a public Itch.io Game Jam. What you'll need: Python 3.8+ pip install -r requirements.txt For site mirrori

Dragoon Aethis 19 Dec 07, 2022
A Telegram bot to download Subtitle for movies and tv shows.

Subtitle Downloader Bot A Telegram bot to download Subtitle for movies and tv shows. Host on Heroku Configuring Environments API_HASH : Your Telegram

Joy Biswas 15 Nov 12, 2022
Vinetrimmer-DRM-TOOL - Widevine DRM downloader and decrypter for AMZN|NF|STAN And all

🍃 ✂️ Vinetrimmer Widevine DRM downloader and decrypter. Thanks to wvleaks for t

Vlad Tănăsescu 20 Jan 13, 2022
The tool allows to download a list of tiktok sounds

dependencies: pip install requests how to use LAUCH THE PROGRAM file (option f)

carpal 3 Jan 21, 2022
Open Source application for downloading and playing music.

Musifre Greetings For HackHeist(Wartex) Judges: Synopsis, Promotion Video & Product Functioning Video are present in Documentation Folder. A Star woul

Yash Dhingra 9 Mar 22, 2022
Make YouTube videos tasks in Todoist faster and time efficient!

Youtubist Basically fork of yt-dlp python module to my needs. You can paste playlist or channel link on the YouTube. It will automatically format to s

Konrad Konieczny 1 Dec 04, 2022
A tool written in Python to download all Snapmaps content from a specific location.

snapmap-archiver A tool written in Python to download all Snapmaps content from a specific location.

46 Dec 09, 2022
FireDM is a python open source (Internet Download Manager) with multi-connections, high speed engine, it downloads general files and videos from youtube and tons of other streaming websites .

python open source (Internet Download Manager) with multi-connections, high speed engine, based on python, LibCurl, and youtube_dl https://github.com/firedm/FireDM

1.6k Apr 12, 2022
A Python script to download PDB files associated with a Portable Executable (PE)

A Python script to download PDB files associated with a Portable Executable (PE)

Podalirius 33 Jan 03, 2023
Most versatile Telegram torrent and youtube-dl bot.

TorToolkit Telegram So basically Tortoolkit is aimed to be the most versatile torrent leecher and Youtube-DL bot for telegram. This bot is highly cust

Yash Khadse 541 Dec 22, 2022
Code for "Adversarial Motion Priors Make Good Substitutes for Complex Reward Functions"

Adversarial Motion Priors Make Good Substitutes for Complex Reward Functions Codebase for the "Adversarial Motion Priors Make Good Substitutes for Com

Alejandro Escontrela 54 Dec 13, 2022
A downloader for Cave Story written in Python

Cave Story Downloader This is a downloader for Cave Story written in Python. Thi

Imsad2 2 Feb 16, 2022
Parallels Desktop dmg downloader

parallelsdesktop-dl Parallels Desktop dmg file downloader Usage usage: pd-dl [-h] [--dlv [DLV]] [-v] Parallels Desktop downloader optional arguments

2 Sep 13, 2022
Music and video downloader, Made with love by Bryan Herrera

Python-Mp3Mp4-Downloader Music and video downloader, Made with love by Bryan Herrera Requirements CHOCOLATELY windows command If your system does not

ርᚱ1ናተᛰ ᚻህᚥተპᚱ 104 Dec 27, 2022
In this repository you will find the test carried out to enter, as a python developer, the company Keeper Solutions.

Bookmarks In this repository you will find the test carried out to enter, as a python developer, the company Keeper Solutions. First it is necessary t

0 Jan 12, 2022
Fetch papers and metadata.

Fetch PubMed Central for open-access papers as well as Sci-Hub

4 Oct 31, 2022
a simple ehentai downloader with jpg 2 pdf

Simple_Ehentai_DownLoader a simple ehentai downloader with jpg 2 pdf 中文介绍 Environment python3.8 How to use before you start,there are some tips. the q

Hibian 6 Dec 11, 2022
Download Youtube videos in mp4 format in a fast, easy, convenient way made with Python!

yt_downloader Download Youtube videos in mp4 format in a fast, easy, convenient way made with Python! Required Modules pytube os time colorama Errors

3 Jul 02, 2022