I wish to download this: https://www.youtube.com/watch?v=pMUcrtBGX5w
and I get this:
PS C:\ytdlp> .\yt-dlp "https://www.youtube.com/watch?v=pMUcrtBGX5w"
[youtube] Extracting URL: https://www.youtube.com/watch?v=pMUcrtBGX5w
[youtube] pMUcrtBGX5w: Downloading webpage
[youtube] pMUcrtBGX5w: Downloading ios player API JSON
[youtube] pMUcrtBGX5w: Downloading tv embedded player API JSON
[youtube] pMUcrtBGX5w: Downloading android player API JSON
[youtube] pMUcrtBGX5w: Downloading web embedded client config
[youtube] pMUcrtBGX5w: Downloading player a62d836d
[youtube] pMUcrtBGX5w: Downloading web embedded player API JSON
ERROR: [youtube] pMUcrtBGX5w: Sign in to confirm your age. This video may be inappropriate for some users.
PS C:\ytdlp>
is it necessary to sign in to youtube? i don't know if I could even do it. not sure if i have any sort of account there....![]()
Support our site by donate $5 directly to us Thanks!!!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
+ Reply to Thread
Results 1 to 30 of 55
-
-
Use cookies from browsers.
For example:
Code:--cookies-from-browser firefox
-
in the past i've used an extension to do this, but browser cookies with yt-dlp are the easiest way!
but if i don't have a browser installed on my system, but a portable version how can load my cookies?
Cookies file is stored on \Data\Default\Network -
https://sendgb.com/ImZF8lUJQHy
Link expires March 4, 2025.We all bleed blue from the inside.... -
https://sendgb.com/M79zDsj41R6
Link expires March 5, 2025.We all bleed blue from the inside.... -
-
My problem is I only use portable browsers.
I mainly use Firefox portable.
So when I use either of these codes:
Code:yt-dlp -f bv* --cookies-from-browser firefox "https://www.youtube.com/watch?v=JmKS9WCTuZg&t=4492s"
Code:yt-dlp -f bestvideo+bestaudio --cookies-from-browser firefox "https://www.youtube.com/watch?v=JmKS9WCTuZg&t=4492s"
ERROR: [youtube] JmKS9WCTuZg: Sign in to confirm your age. The video you have requested has been rated R and may contain content intended for mature audiences.
yt-dlp: error: unsupported browser specified for cookies: "mozilla". Supported browsers are: brave, chrome, chromium, edge, firefox, opera, safari, vivaldi, whale
Is there a way to get yt-dlp with a portable browser?
Most of the time yt-dlp works fine on unrestricted videos.
With those there is no need to add the " --cookies-from-browser firefox" .Last edited by cholla; 22nd May 2025 at 11:15.
-
Normally, yt-dlp uses the --cookies-from-browser option when a supported browser is installed. Since that's not the case here, you'll need to export your cookies manually using a browser extension.
Export your cookies in Netscape format and then run:
Code:yt-dlp --cookies cookies.txt "VIDEO_URL"
https://addons.mozilla.org/en-US/firefox/addon/cookies-txt/
If you encounter any further issues, I recommend trying Perplexity.ai or ChatGPT for additional help. -
From one of the issues of the yt-dlp repo at github:
You'll need to follow some extra steps to for firefox forks:
Visit about:profiles in the firefox fork
Copy the "Root Directory"
When you want to use cookies from that browser, you'll need to use --cookies-from-browser "firefox:path" (eg --cookies-from-browser "firefox:C:\Users\username\AppData\Roaming\Mozilla \Firefox\Profiles\12345678.default-release") -
@ loadtheCD,
Where should the "cookies.txt" be located ?
I tried this:Found using Perplexity.ai
Code:yt-dlp --cookies /path/to/cookies.txt "https://www.example.com/video"
This still did not work.
@ Obo,
The directory in you example was already is the :C:\Users\username\AppData\Roaming\Mozilla \Firefox\Profiles\12345678.default-release".
Unless I need to copy the root directory from C:\FirefoxPortable to the above location.
The directory in AppData has the 12345678.default-release.
The directory in C:\FirefoxPortable does not.
I was able to find this video on another site & downloaded it with no problem.
I tried all the suggestions but none worked.
I'm certain I put the paths to the recommended directories correct.
I would still like to fine a way to do this as I'm certain I will run into an age restricted video again.
It was just an R rated movie.It has been a long time since I watched it & I do not believe there is any nudity in it.
So it is other content that gets the R rating.Last edited by cholla; 23rd May 2025 at 10:46. Reason: Added comment about suggestions
-
My question to you is: were you able to successfully export your cookies from YouTube in Netscape format to a cookies.txt file?
If so, simply navigate (cd) to the directory where you saved the cookies.txt file and run the following command:
Code:yt-dlp --cookies cookies.txt "VIDEO_URL"
If you're still running into issues or unable to figure it out, consider performing a full browser installation and using the --cookies-from-browser firefox option once the browser is installed.
If you continue to have problems, please be more specific about what you're experiencing. Providing screenshots is extremely helpful. -
Yes
I did this above.
It has not so far.
I do not want a full browser installation, If I did I would have one.
Here is a screenshot. If you want a different one please tell me what you want & I will try to post it.
IThe screenshot also has other suggestions I have tried for doing this.
[Attachment 87110 - Click to enlarge] -
First, sign in to YouTube and export the cookies from that tab using the Mozilla extension in Netscape format. Then, direct the program to this cookies.txt file and attempt to run your command.
Did you do it this way, or tried something else? -
@ pram0dm,
I believe I have tried every way suggested.
I do get a different Error from the yt-dlp command when logged into YouTube with the movie up.
This content can't be played on your mobile browser
The thing is I can play this movie in my browser with no problem.
I just cannot download it.
This is the relevant part in command:
[Attachment 87116 - Click to enlarge]
This is what a non age restricted video has & it downloads with no problem.
I usually do not need to use the "cookies" method for non age restricted movies but I did this time for the test.
[Attachment 87118 - Click to enlarge]Last edited by cholla; 24th May 2025 at 09:43. Reason: better screenshot
-
This did not work either. I hope I put the code in the correct location of the code.
I did check for & use the user-agent for my PC & browser.
I believe this should be correct instead of using the user-agent posted by pram0dm.
My user-agent is:
Code:--user-agent Mozilla/5.0 (Windows NT 6.1; rv:109.0) Gecko/20100101 Firefox/115.0
The URL without me logged into YouTube got this message:Something went Wrong.Please try again.The uploader has not made this video available in your country. -
You'll definitely need those cookies to download this age-restricted video. It works for me after I extract and use the cookies from a complete browser installation.
At this stage, since the forum is running out of ideas, I suggest you to install a full browser and call it a day.
You could also raise it as an issue over at yt-dlp's GitHub page and see if you can garner any responses. -
The firefox add on was already suggested in post #12 by loadtheCD.
I installed in in my firefox browser.
That is how I got the cookies.txt I used,
I put it in the yt-dlp folder.
This Error pretty much says it:
This is in one of the command images I posted.
ERROR: [youtube] JmKSSWCTuZo: This content can't be played on your mobile browser. Get the YouTube app to start watching.
It sure will not download it.
If another movie comes up that is restricted I will give it another try.
I was able to get a good copy from another website. -
Are you running a portable Firefox on your PC? Possibly it behaves differently. Install the regular version to test.
I downloaded the video wthout any issues.
The path can be specified, eg. if cookies.txt is on your desktop, you can specify
--cookies c:\users\your_userid\desktop\cookies.txt -
I only run portable browsers on my PS.
I have done this for many years.
I keep a spare of each portable on a different partition.
If something gets corrupted or I otherwise want to completely eliminate the portable .
I delete it & everything about it is gone.
Then I just replace copy the spare to my C: drive.
The only browser I have installed is Internet Explorer & it con not be completely remover from Windows.
At least without serious problems.
I know because I tried with previous Windows versions.
So I disable it.
This means I am not going to install a regular version even for a test.
I believe that you & others have been able to download an age restricted movie.Including this one.
With some of the methods posted.
The path can be specified, eg. if cookies.txt is on your desktop, you can specify
--cookies c:\users\your_userid\desktop\cookies.txt[/QUOTE]
This is the code I used Mainly but I did try all the suggested variations:
Code:cd C:\Users\users\Desktop\Vedit\yt-dlp yt-dlp -f bv*+ba* --cookies cookies.txt C:/Users/users/Desktop/Vedit/yt-dlp/cookies.txt "https://youtu.be/JmKS9WCTuZg?t=10"
Code:--user-agent Mozilla/5.0 (Windows NT 6.1; rv:109.0) Gecko/20100101
Code:yt-dlp -f bv*+ba* --cookies-from-browser firefox:C:\Users\users\AppData\Roaming\Mozilla\Firefox\Profiles\llzydrdl.default-release "https://youtu.be/JmKS9WCTuZg?t=10"
Code:yt-dlp -f bv*+ba* --cookies-from-browser firefox "https://youtu.be/JmKS9WCTuZg?t=10"
Code:yt-dlp -f bv*+ba* --cookies-from-browser \firefox:C:\FirefoxPortable\Data\profile "https://youtu.be/JmKS9WCTuZg?t=10"
My conclusion is yt-dlp can not download an age restricted with Firefox Portable or Opera Portable. -
See #10: show verbose output of your command.
Preferably both: with exported cookies file and cookies-from-browser option. -
Also, modify your first command as below and retry. Ensure that the cookies.txt file exists in the same location.
Code:cd C:\Users\users\Desktop\Vedit\yt-dlp yt-dlp -f bv*+ba* --cookies cookies.txt "https://youtu.be/JmKS9WCTuZg?t=10"
-
I believe these are what you asked for.
I copied them from the Command window & pasted the information into Notepad.
I believe these will be easier to read than a screenshot.
I'm also posting the cookies.txt.
This is the one the Firefox add on generates.
I selected "Current Container" .Last edited by cholla; 26th May 2025 at 12:05.
-
You should delete the cookies file, it contains sensitive data (I've never asked you to upload it anyway).
You are using a quite outdated version of yt-dlp, and not using the latest version of yt-dlp might be one of the reasons you fail to download (seeing all the changes YT made in half a year...)
That might as well be the reason why the log contains these messages: "WARNING: [youtube] YouTube said: ERROR - Request contains an invalid argument."
The lines
Code:Extracting cookies from firefox [debug] Extracting cookies from: "C:\Users\user\AppData\Roaming\Mozilla\Firefox\Profiles\wyuf8etg.default-esr\cookies.sqlite" Extracted 0 cookies from firefox
Similar Threads
-
4K Video Downloader Issue With YouTube Non-Paid Log-In Restricted Videos
By Frank-0-Video in forum Video Streaming DownloadingReplies: 8Last Post: 7th Feb 2025, 18:31 -
Please delete - wrong details
By adrian44 in forum Video Streaming DownloadingReplies: 0Last Post: 12th Oct 2023, 03:29 -
Youtube account sign in not working - account recovery
By techmot in forum ComputerReplies: 5Last Post: 20th Apr 2023, 18:14 -
Download Age- Restricted Content - Youtube
By devilcoelhodog in forum Video Streaming DownloadingReplies: 1Last Post: 7th Jul 2022, 00:02 -
Youtube asking for an ID to watch age restricted videos
By vmackey in forum Video Streaming DownloadingReplies: 15Last Post: 31st Jul 2021, 13:54