Software >
https://github.com/yt-dlp/yt-dlp
A downloader for YouTube and many other places.
- A fork and improvement of youtube-dl
-
Has it’s own YouTube comment scraper, obsoleting youtube-comment-scraper
–
- 2022-07-14 – 2022.06.29 on Windows Subsystem for Linux 2
- 2022-06-30 – 2022.06.29 on Windows 10
- 2022-06-30 – Switched from youtube-dl
-
2022-06-30 – Switched from youtube-comment-scraper
Usage ∞
2022-06-30 – 2022.06.29 on Windows 10 this seemed to work:
yt-dlp.exe --audio-format best --write-info-json --write-annotations --write-all-thumbnails --embed-thumbnail --all-subs --embed-subs --add-metadata --output '%(uploader)s/%(upload_date)s - %(title)s/%(title)s.%(ext)s' --format 299-dash+140-dash --merge-output-format mp4 --write-comments "jNQXAC9IVRw"
This didn’t seem to work, and hasn’t been troubleshooted.
--output '%(uploader)s/%(upload_date)s - %(title)s/%(title)s.%(ext)s'
TODO ∞
- https://github.com/TheFrenchGhosty/TheFrenchGhostys-Ultimate-YouTube-DL-Scripts-Collection
-
Investigate if I need to fiddle with cookies again: https://www.reddit.com/r/youtubedl/comments/vuatbt/fyi_google_removed_the_get_cookiestxt_extension/
Usage ∞
TODO – Solving HTTP Error 429 ∞
I can reproduce this when downloading a long list of subtitles [ 1 ] :
ERROR: Unable to download video subtitles for 'or': HTTP Error 429: Too Many Requests
–
Not working:
--sleep-subtitles 4
TODO
Getting cookies (on desktop) ∞
DO NOT USE AN EXTENSION FOR THIS
Get and use cookies for yt-dlp (using Python) ∞
2025-03-17 – for yt-dlp 2025.02.19 – with Python 3.9.2 on WSL2 on Windows 11 using cookies from Brave 1.76.74 Chromium: 134.0.6998.89 (Official Build) (64-bit)
- Open your web borwser
- Press
F12to open DevTools - I recommend you Move your dock location to the bottom or a new window.
- At the top, pick the “Applications” tab
- On the left, find “Storage” and select “Cookies”
- Select the very first cookie –
https://www.youtube.com - On the right will be some new content. You may have to expand your DevTools panel to see it clearly.
- Select all of that text. You cannot
control-ato do so, you must manually select from the top-left text and go down it all. - Copy
-
On WSL2
cd ~ nano youtube-cookies.txt # paste your text # save and quit nano git clone https://github.com/hcisok/python-convert-chrome-cookies-to-netscape-format python ~/python-convert-chrome-cookies-to-netscape-format/convert-cookies.py ~/youtube-cookies.txt > ~/youtube-cookies-netscape.txt yt-dlp --cookies ~/youtube-cookies-netscape.txt 1jYdHa_bu2k
Using JavaScript (broken) ∞
For Chrome and variations like Brave and Microsoft Edge.
-
On a new tab, visit https://raw.githubusercontent.com/dandv/convert-chrome-cookies-to-netscape-format/master/convert-cookies.js
- Copy this script
- On a new tab, visit https://www.youtube.com/
- Press
F12to open the DevTools panel - In DevTools, Switch to the “Console” tab.
- Manually type
allow pasting - Paste the JavaScript text you copied
-
More TODO…
TODO – Using cookies ∞
TODO
Getting cookies (on desktop) might be easier.
–cookies-from-browser brave:Profile\ name
–cookies-from-browser brave
Get the directory of your profile:
%LOCALAPPDATA%
brave://version/
e.g.
/mnt/c/Users/USERNAME/AppData/Local/BraveSoftware/Brave-Browser/User Data/PROFILE\ DIRECTORY
where
USERNAMEis whatever you log in as-
PROFILE\ DIRECTORYmight simply beDefault
FileNotFoundError: could not find brave cookies database in "/path/to/wherever"
doesn’t fucking work..
programmers can check out their cookies.py
TODO – Downloading age restricted videos ∞
Redact content in the .json file ∞
--parse-metadata "video::(?P<url>)"
--alias --minimal-info-json '--parse-metadata "video::(?P<formats>)" --parse-metadata "video::(?P<url>)" --parse-metadata "video::(?P<http_headers>)" --parse-metadata "video::(?P<automatic_captions>)" --parse-metadata "video::(?P<subtitles>)" --parse-metadata "video::(?P<thumbnails>)"'
Alternatives ∞
- youtube-dl
-
https://github.com/blackjack4494/yt-dlc
- As of 2021-09-19 last updated 2020-11-11
Footnotes
-
oris just a language code, like how.enis for English. [ ↩ ]

solved the cookies problem