JDownloader2 downloads Age-restricted YouTube videos

All hardware and software related discussion topics here. Advice, discussion and opinions on either topic are welcome.
User avatar
Night457
Global Moderator
Posts: 5334
Likes:
Joined: Sat Dec 28, 2019 3:44 pm

JDownloader2 downloads Age-restricted YouTube videos

Post by Night457 »   3 likes

DISCUSSION:

There are sites that let you download age-restricted YouTube (and other sites) videos without logging in to anything:
https://9xbuddy.xyz/en-1bh
https://piped.video/

9xbuddy also downloads subtitles. Recently when I tried to use it to download Automated Subtitles on an Age-Restricted video, it did not work for me. I don't know why it did not work, but I had to use something else. youtube-dl and I think also yt-dlp are restricted from downloading Age-restricted videos. There may be a way around that, but I have not figured that out for those yet. (EDIT: Anyone, is there a way to use yt-dlp to access restricted content? If so, please post.)

I knew that JDownloader2 should work if I set it up with YouTube cookies.
The how-to instructions to do this are here:
https://support.jdownloader.org/Knowled ... structions

I had bookmarked that page long ago, but for some reason this time it was only available to me with a jdownloader site login. So I registered here:
https://board.jdownloader.org/index.php
And some hours later the Moderators approved my registration and I could see the Help page after logging in. Now I have logged out, cleared my browser history, exited my browser, changed my VPN server, gone back to my browser ... and I can still see the Help page, WITHOUT logging in! I am completely bewildered. Maybe it just did not like the IP address I was coming in from before. I just do not know!

Short version how-to:
1) Log in to your YouTube account.
2) Export the cookies.
3) Import your cookies into Jdownloader2 / Settings /AccountManager / Add account / Youtube.

You can then download age-restricted videos and the subtitles. WITHOUT logging in to YouTube. EDIT: You still have to Login to YouTube, so this is not as good an option as 9xbuddy or piped.video. It is a workable secondary option for when you need it.

It will NOT ask for your password, just your YouTube account username, and the cookies you generated. I used a dummy gmail email youtube account anyway, just for extra security. Eventually after some period of time (hours? days? weeks? months? every jdownloader session??) the cookies will expire and it will have to be done again. I don't download age-restricted videos very often. Yet I easily forget how and have to refer again to the Help page.

This same technique is also meant for other sites with login requirements, but I have not used it for anything except YouTube.

In case someone else is blocked from seeing the Help page, I include the text below, without pictures and without links.

FULL TEXT INSTRUCTIONS:
Spoiler:

Cookie login instructions

Posted by pspzockerscene psp, Last modified by pspzockerscene psp on 07 December 2022 11:44 PM
Cookie login instructions

This guide is only relevant for a hand full of services! Most of all times you will get a message in JD that leads you to this article.
Do not try these instructions on other than the advised websites in JD - it most likely won't work!
In some rare cases you may be advised by one of our supporters to try this login method for a specified service even if the JDownloader application did not ask you to do so.
Most of all services require you to enter your E-Mail/username & password in JD but for some, the following process is required or can optionally be used instead:

1. If your browser supports browser profiles, create a separate browser profile to initiate the login session that you will open later throughout this guide.
Alternatively you can use a private/incognito window. In this case make sure to allow the addons described below to be used in private browsing otherwise your private window will open without browser addons.
It is not recommended to use your current/normal browser session because JD could interfere with it and e.g. change the default language of the website you are about to login.
Also if you use your current session and you ever logout in your browser, JDownloader will be logged out too which you typically don't want to happen.

2. Use your browser to login into the website you want to use with JD like you normally do.
If that website has a checkbox during its' login process like "Keep session", "Trust this computer" or "Do not ask again" or similar, enable it!
Do not logout in your browser afterwards as this would terminate your session in JD too. Simply close your browser window once you're done with the last step of these instructions.

3. Exporting your cookies
Now you need to export the cookies of the website you've just logged in in order to import them into JD.
This requires you to install one of the following browser addons in the two options following down below.

Step 3 option 1: FlagCookies (Firefox, Chrome, Opera)

a. Install the open source addon Flag Cookies (Firefox | Chrome | Opera).
b. Visit the website you want JD to login into.
If you've opened the website before installing the addon, reload the page once.
c. Click on the addons' symbol --> Preferences --> Scroll down until you see the "Export cookie data to clipboard" button from the screenshot below and click on it:

Now continue with the next numbered step down below.

Step 3 option 2: EditThisCookie (Chrome, Opera)

a. Install the open source addon EditThisCookie.
b. Navigate to the options of EditThisCookie and make sure that "Choose the preferred export format" is set to "JSON" as shown in the following screenshot:

c. Visit the website you want JD to login into and then export your cookies as shown in the screenshot below.
If you've opened the website before installing the addon, reload the page once.
Doing this will copy your cookies into your clipboard so you are ready to continue with the next numbered step down below.


4. Importing your cookies in JDownloader
Open JD and go to Settings -> Account Manager, click on Add account and look for the website you want to login into and for which you've exported your cookies.
Enter your username/E-Mail into the username field, paste your exported cookies into the password field and click Save:

JDownloader should accept your account in a few seconds.

Troubleshooting: Login with exported cookies isn't working - what to do?

Make sure that the cookies you've exported are for exactly the domain that is shown in JD e.g. if you want to login into "drive.google.com", export your cookies while you're logged in and have opened the website "https://drive.google.com/bla".
Some websites might redirect you to another domain than the one you've selected in JD e.g. inside JD it is 'example.de' but that redirects you to 'example.com'.
In this case you can try it with that other domain anyways.
Open the website you want to login into in your browser, logout if you're still logged in, clear your browsers' cookies and try again.
Repeat all steps with another browser and/or another addon for exporting cookies:
The above instructions contain at least two addons/options you can use in step 3 for cookie export!
Try again with the option you haven't tried yet.
If you think you've followed these instructions correctly but you just can't get it to work, you can contact our support.
Adding multiple accounts of the same host to JD using cookie login

If you want to add multiple accounts of the same host to JDownloader, here is how that's possible.
As stated above, logging out in your browser will invalidate that cookie session in JDownloader too so you can't just log out in your browser, login into another account and add that to JDownloader.
Example use case when the following instructions can be helpful for you: You want to add 3 different drive.google.com accounts to JDownloader.

Method 1:

Create a new browser profile for each account you want to add to JD.
In each browser profile: Login in your browser in that profile and add the cookies to JDownloader.
Method 2:

Allow your browser to enable the addon you're using for cookie export in incognito mode/private tab too.
Open a private tab/incognito window.
Login into your account and add the cookies to JD.
Now close that window (do not log out!) and repeat these instructions for every account of that same host you want to add.
User avatar
mimzy
Posts: 1443
Likes:
Joined: Fri Aug 12, 2011 7:00 am

Re: JDownloader2 downloads Age-restricted YouTube videos

Post by mimzy »   1 likes

Night457 wrote: Wed Feb 15, 2023 3:36 am Now I have logged out, cleared my browser history, exited my browser, changed my VPN server, gone back to my browser ... and I can still see the Help page, WITHOUT logging in!
You did not clear cookies, right?
Night457 wrote: Wed Feb 15, 2023 3:36 am Short version how-to:
1) Log in to your YouTube account.
2) Export the cookies.
3) Import your cookies into Jdownloader2 / Settings /AccountManager / Add account / Youtube.

You can then download age-restricted videos and the subtitles WITHOUT logging in to YouTube.
You DID log in to your YouTube account and copied the cookies to Jdownloader2, so saying that this way you can download videos WITHOUT logging in is not accurate. YouTube knows that it is you, because you have the cookies. Just log out from YouTube using a browser and Jdownloader2 won't work anymore...

It is a useful technique, but just to be clear, you won't be downloading stuff anonymously.
User avatar
Night457
Global Moderator
Posts: 5334
Likes:
Joined: Sat Dec 28, 2019 3:44 pm

Re: JDownloader2 downloads Age-restricted YouTube videos

Post by Night457 »   0 likes

mimzy wrote: Wed Feb 15, 2023 12:48 pm You did not clear cookies, right?
I cleared everything for all time, not just the search history but also the cookies. This was after I was done downloading.
YouTube knows that it is you, because you have the cookies. Just log out from YouTube using a browser and Jdownloader2 won't work anymore...
Dammit, you are right. :cry:

I had not done this often enough to really understand it. I guess I am something of a prude, so rarely do I encounter age-restricted content anyway. ;) I was under the mistaken impression that I ONLY had to login that once to setup jdownloader, and then I could continue to retrieve a variety of age-restricted videos on subsequent days without having to login again. Apparently that only works for the people who never log out, never clear cookies and search history, and probably autologin to every site too. That is not me.

I don't care if YouTube knows that my fake gmail is watching so-called adult videos, but I do hate the tedium of logging in to site after site after site for no reason. This will be a tool I keep available if and when the sites like 9xbuddy and piped.video are not working for me.

But I have to admit that I have never understood the mysterious magic of "cookies", which are probably disingenuously named. They should be called something like "spying nanobots", right? If I setup jdownloader with my fake-gmail cookies and subsequently download 10 age-restricted videos, will the cookies then report back to YouTube Central this fact? Is this from putting the URL in Jdownloader, or is it from accessing the video page in YouTube itself? What if I get the cookies by logging in from one browser (like Chrome), and then I retrieve the URLs from another browser (like Firefox) where I am NOT logged in? (Or I have a list of URLs saved in a text file from some previous day where I was not logged in.) The browser where I am not logged in can tell YouTube nothing, but can the "spying nanobots" / cookies that I put in Jdownloader tell YouTube what it wants to know, that I am the very least "visiting the page", so to speak?
User avatar
pistachio
Posts: 53
Likes:
Joined: Sat Mar 19, 2022 5:08 am

Re: JDownloader2 downloads Age-restricted YouTube videos

Post by pistachio »   0 likes

Night457 wrote: Wed Feb 15, 2023 2:43 pmI guess I am something of a prude, so rarely do I encounter age-restricted content anyway. ;)
What? I recall you talking a lot about mondo films and that kind of stuff. Maybe I'm thinking of someone else.

9xbuddy hasn't been working for me lately. It could just be my setup. Whenever the page starts loading it just hangs indefinitely. I've been getting a lot of youtube vids with tuberipper but I don't know about the age-restricted videos. Just another alternative you might check out.
User avatar
Night457
Global Moderator
Posts: 5334
Likes:
Joined: Sat Dec 28, 2019 3:44 pm

Re: JDownloader2 downloads Age-restricted YouTube videos

Post by Night457 »   1 likes

pistachio wrote: Wed Feb 15, 2023 9:00 pm What? I recall you talking a lot about mondo films and that kind of stuff. Maybe I'm thinking of someone else.
:D "Mondo Cane" documentary? John Waters' "Mondo Trasho"? Classics!

I was being a smartaleck. I don't think real prudes would consider me a prude. But real perverts might.

And there is very little that is age-restricted on YouTube that I think is justified in actually being restricted, certainly not the videos I am getting.

I have seen some page hangups on the 9xbuddy popup loading window, so I close that and try it again. Maybe I try right-click instead of left-click, I can't say I think about it too much. Whatever I do, it usually works for me eventually. I'll try that tuberipper some time, thanks!
User avatar
mimzy
Posts: 1443
Likes:
Joined: Fri Aug 12, 2011 7:00 am

Re: JDownloader2 downloads Age-restricted YouTube videos

Post by mimzy »   2 likes

Night457 wrote: Wed Feb 15, 2023 2:43 pm But I have to admit that I have never understood the mysterious magic of "cookies", which are probably disingenuously named. They should be called something like "spying nanobots", right? If I setup jdownloader with my fake-gmail cookies and subsequently download 10 age-restricted videos, will the cookies then report back to YouTube Central this fact? Is this from putting the URL in Jdownloader, or is it from accessing the video page in YouTube itself? What if I get the cookies by logging in from one browser (like Chrome), and then I retrieve the URLs from another browser (like Firefox) where I am NOT logged in? (Or I have a list of URLs saved in a text file from some previous day where I was not logged in.) The browser where I am not logged in can tell YouTube nothing, but can the "spying nanobots" / cookies that I put in Jdownloader tell YouTube what it wants to know, that I am the very least "visiting the page", so to speak?
Well, HTTP itself is stateless and does not have a notion of a session or being "logged in". What happens when you log in is that you get a session ID, which is usually saved in your browser as a cookie. Any subsequent HTTP request from the same browser to the same site contains this cookie, so the server knows that the request is coming from the same user.

If you copy the cookie to another browser (or JDownloader), you are in principle also "logged in" in that other browser. In practice, the server may discard your session if you are coming from a different browser or IP, though.

Bad cookies are the so-called 3rd-party cookies. When a page has embedded ads from 3rd-party sites, these 3rd-party sites obviously cannot access cookies of other sites (otherwise they could steal your cookies and log in as you!), but they can set their own cookies. This way they can track you across different sites that have embedded ads from the same company.
User avatar
goku33
Posts: 1161
Likes:
Joined: Sun Oct 16, 2022 12:11 pm
Location: The Machine

Re: JDownloader2 downloads Age-restricted YouTube videos

Post by goku33 »   2 likes

Regarding the website first not showing you everything..I had a similar issue with the aMule forum and it could be indeed connected to the vpn server being blacklisted.

Anyways.. https://piped.video for just watching age restricted videos.
User avatar
alex83
Posts: 1
Likes:
Joined: Sun Feb 19, 2023 7:44 am

Re: JDownloader2 downloads Age-restricted YouTube videos

Post by alex83 »   1 likes

(EDIT: Anyone, is there a way to use yt-dlp to access restricted content? If so, please post.)
yt-dlp implemented a fix last year that makes it work without any special modifications with the vast majority of age-restricted Youtube videos: https://github.com/yt-dlp/yt-dlp/pull/3233

There are a couple I've found that it can't download, but it works on videos like https://www.youtube.com/watch?v=-24s0UQ6jCE just fine.

I'd also recommend the UserScript (same author as the yt-dlp fix) if you like to watch Youtube in your browser without logging in https://github.com/zerodytrash/Simple-Y ... ss.user.js
Honestly, modern YT is borderline unusable without 5+ UserScripts to fix the stupid changes they've made in the past couple years.
User avatar
Night457
Global Moderator
Posts: 5334
Likes:
Joined: Sat Dec 28, 2019 3:44 pm

Re: JDownloader2 downloads Age-restricted YouTube videos

Post by Night457 »   0 likes

THANK YOU, alex83!! This is what I wanted to know!
alex83 wrote: Sun Feb 19, 2023 8:14 am yt-dlp implemented a fix last year that makes it work without any special modifications with the vast majority of age-restricted Youtube videos:
Other members have been telling me for probably the last year to upgrade from youtube-dl to yt-dlp, but I have been lazy. This should finally convince me!
Honestly, modern YT is borderline unusable without 5+ UserScripts to fix the stupid changes they've made in the past couple years.
Agreed, I can not watch it. I am guessing that this is why goku has been posting links from yewtu.be, which is something I had never heard of and do not know about. Right, goku?

EDIT, half hour later: I just wanted to quickly download something without fuss and without opening Jdownloader, yet youtube-dl failed me. So I finally downloaded yt-dlp! I had to look carefully to make sure I had the correct version of both it and ffmpeg for my old machine and Windows OS, but I was happy to have the basic version work! Thank you to all the yt-dlp fans for their repeated recommendations. I will add the various necessary fixes later.
User avatar
Walter
Posts: 93
Likes:
Joined: Mon Apr 08, 2019 8:57 am

Re: JDownloader2 downloads Age-restricted YouTube videos

Post by Walter »   0 likes

Hi. I'm trying to download these two age-restricted You-Tube videos (and yes, I know they are of the same movie - I want to have them both to compare quality):

https://www.youtube.com/watch?v=I3qdp4c ... &index=263

https://www.youtube.com/watch?v=ILMsDue ... &index=264

What would you recommend as the easiest/best way to obtain these videos? If the exact same videos can be obtained on a different site, that's fine. I do have Jdownloader2 installed and working.
Post Reply