Saturday, April 11, 2020

use youtube-dl with sites that need credentials/cookies

You might want to download something with youtube-dl, and get the following error:

ERROR: XXXX requires authentication. You may want to use --cookies.


Quick way to get the cookies and do the download:
1. get the chromium/chrome extension Editthiscookie
https://chrome.google.com/webstore/detail/editthiscookie/fngmhnnpilhplaeedifhccceomclgfbg/related?hl=en

2. on editthiscookie's settings, go to options -> "Choose the preferred
export format for cookies" -> "Netscape HTTP Cookie File"

3. on the site you're trying to download the video, click on
editthiscookie's extension, export

4. paste/yank your clipboard's contents into a file

5. do youtube-dl --cookies exported_cookies_file https://the-vid-you-wanted-to-download

No comments:

Post a Comment