How to download Membership only videos?
This guide documents the setup process that worked for me on Windows. It assumes you already have legitimate access to the videos through your own account.
Important: Respect copyright laws and platform terms. Only access content you are authorized to view.
Prerequisites
Step 1 - Prepare Google Chrome
Install Google Chrome if not already installed.
Set Chrome as your default browser.
Sign into Chrome using the same Google account that has access to the videos.
Open YouTube and verify you can watch the videos normally.
Step 2 - Install Python
Download Python from https://www.python.org/downloads/
During installation check Add Python to PATH.
Finish installation.
Verify:
$$
python –version
$$
You should see something similar to:
$$
Python 3.12.x
$$
Step 3 - Install Node.js
Download Node.js LTS from https://nodejs.org
Install using default options.
Verify:
$$
node –version
npm.cmd –version
$$
Step 4 - Install Deno
Some environments may use Deno when working with yt-dlp JavaScript challenge solving.
Install:
$$
irm https://deno.land/install.ps1 | iex
$$
Verify:
$$
deno –version
$$
Step 5 - Install FFmpeg
Install:
$$
winget install Gyan.FFmpeg
$$
After installing FFmpeg, completely close PowerShell / CMD and open a new terminal window. Otherwise ffmpeg may not be detected because PATH has not refreshed yet.
Verify:
$$
ffmpeg -version
$$
Step 6 - Install yt-dlp
$$
python -m pip install -U yt-dlp
$$
Verify:
$$
python -m yt_dlp –version
$$
Step 7 - Install yt-dlp-ejs
$$
python -m pip install -U yt-dlp-ejs
$$
Step 8 - Verify Everything
$$
python –version
node –version
npm.cmd –version
deno –version
ffmpeg -version
python -m yt_dlp –version
$$
All commands should display version information without errors.
Step 9 - Export Cookies
Install the following Chrome extension:
Chrome Web Store:
Get cookies.txt LOCALLY - Chrome Web Store
GitHub Project:
https://github.com/kairi003/Get-cookies.txt-Locally
Open YouTube in Chrome.
Make sure you are logged in.
Click the extension icon.
Export cookies in Netscape format.
Save the file as cookies.txt.
Step 10 - Download Videos
Replace VIDEO_URL with the actual URL.
$$
python -m yt_dlp –cookies cookies.txt –remote-components ejs:npm -f “bv*+ba/b” –merge-output-format mp4 “Video/PlayList Link”
$$
If you have already donnwloaded 80 video oit of 120 in a p playlios then yiu can start from 81st vdieo with this command
$$
python -m yt_dlp –playlist-start 81 –cookies cookies.txt –remote-components ejs:npm -f “bv*+ba/b” –merge-output-format mp4 “URL”
$$
This shows download the best available format of video and confirms your setup is working.
Optional - Download Videos to a Specific Folder
By default, videos will be downloaded to the current folder where you run the command.
You can create a dedicated folder for your downloads:
$$
mkdir MyVideos
cd MyVideos
$$
You can still reference cookies.txt from another location using a relative path:
$$
python -m yt_dlp –cookies ..\cookies.txt –remote-components ejs:npm -f “bv*+ba/b” –merge-output-format mp4 “VIDEO_URL”
$$
Example folder structure:
$$
Downloads
├── cookies.txt
└── MyVideos
$$
In this example, cookies.txt stays in Downloads while all downloaded videos are stored inside MyVideos.
Frequently Asked Questions (FAQ)
Q: ffmpeg is installed but Windows says ‘ffmpeg is not recognized’?
A: Close all PowerShell/CMD windows and open a brand new terminal. FFmpeg updates the PATH variable during installation and existing terminals will not see the change.
Q: npm gives an Execution Policy error?
A: Use:
$$
npm.cmd –version
$$
instead of:
$$
npm –version
$$
Q: The command only shows image formats?
A: Usually one of the following:
cookies.txt is invalid or expired
You are not logged into the correct YouTube account
yt-dlp-ejs is not installed
Node.js installation is missing or broken
Q: Do I need Deno?
A: Not always. In my testing, the ejs:npm solution using Node.js worked reliably. Deno is included because some setups may use it.
Q: Can I download an entire playlist?
A: Yes.
$$
python -m yt_dlp –cookies cookies.txt –remote-components ejs:npm -f “bv*+ba/b” –merge-output-format mp4 “PLAYLIST_URL”
$$
Q: Can I resume from a specific playlist video?
A: Yes.
$$
python -m yt_dlp –playlist-start 81 –cookies cookies.txt –remote-components ejs:npm -f “bv*+ba/b” –merge-output-format mp4 “PLAYLIST_URL”
$$
Q: How do I download only a few videos from a playlist?
$$
python -m yt_dlp –playlist-items 10-20 –cookies cookies.txt –remote-components ejs:npm -f “bv*+ba/b” –merge-output-format mp4 “PLAYLIST_URL”
$$
Q: My cookies stopped working after a few weeks?
A: Export a fresh cookies.txt file using the browser extension and replace the old one.
Q: Can I keep the downloaded videos forever?
A: Downloaded files stay on your computer until you delete them. Make sure you have enough disk space because large playlists can consume many gigabytes.
Q: How much space do I need?
A: 1080p videos are often hundreds of megabytes each. Large playlists may require tens of gigabytes of free storage.