JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 10.08.2022, 23:19
Cyberavater Cyberavater is offline
JD Legend
 
Join Date: Feb 2019
Posts: 732
Default How does actually login using cookies work? [Off -topic]

I'm currently trying to build a Facebook decrypter, but a login is required for some private links.

I'm interested in how JD is achieving this, I tried exporting the cookie and importing it on another browser session, and it's not logged in.
Reply With Quote
  #2  
Old 11.08.2022, 16:52
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,289
Default

@Cyberavater: no magic, we/JDownloader just set all the cookies, that's all. nothing more, nothing less.

please know that this approach might now work in browser, because JDownloader only does specific requests while browser has a full browser engine running all js that can result in different behaviour of the website.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #3  
Old 11.08.2022, 17:15
Cyberavater Cyberavater is offline
JD Legend
 
Join Date: Feb 2019
Posts: 732
Default

"a full browser engine", what's JDs js engine? Isn't it also a browser, i.e headless browser?

Edit: Oh, you've already said it.
"specific requests" So, basically you make specific requests you get from developer tools?

But, since you are an expert can you suggest to me some ideas about how to log in using cookies in a full browser?

Last edited by Cyberavater; 11.08.2022 at 17:28.
Reply With Quote
  #4  
Old 11.08.2022, 17:40
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,289
Default

Quote:
Originally Posted by Cyberavater View Post
"a full browser engine", what's JDs js engine? Isn't it also a browser, i.e headless browser?
No browser, nothing.
Quote:
because JDownloader only does specific requests
JDownloader only loads a http request and then parses information via Regex/Pattern and plugins know what to do next and how. no js/no css/no browser engine.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #5  
Old 11.08.2022, 17:41
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,289
Default

Quote:
Originally Posted by Cyberavater View Post
But, since you are an expert can you suggest to me some ideas about how to log in using cookies in a full browser?
What exactly does fail? what error do you get? are you sure you set all cookies correct?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #6  
Old 11.08.2022, 18:12
Cyberavater Cyberavater is offline
JD Legend
 
Join Date: Feb 2019
Posts: 732
Default

>What exactly does fail? what error do you get? are you sure you set all cookies correct?

Simple really, what I do is use "edit this cookie" to get the cookie, and import it on an unlogged-in browser session using the same extension "edit this cookie", but even after that, it's not logged in on the new browser session.

Currently, I'm trying it on the regular browser to see if it works, before trying to implement it on selenium.
Reply With Quote
  #7  
Old 11.08.2022, 18:33
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,918
Default

Hm technically it should also work with selenium.
Maybe Facebook has implemented a detection for Selenium although it would be strange because it accepts plain http requests and cookies are even valid for different User-Agents than e.g. the one a session has been created with afaIk.
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #8  
Old 11.08.2022, 18:51
Cyberavater Cyberavater is offline
JD Legend
 
Join Date: Feb 2019
Posts: 732
Default

No, Actually I'ven't tried with using selenium yet, since I failed with "edit this cookie" on a regular browser.

As it seems, I'll have better luck on selenium as they have cookie support, "driver.manage().addCookie(cookie)"
Reply With Quote
  #9  
Old 11.08.2022, 18:55
Cyberavater Cyberavater is offline
JD Legend
 
Join Date: Feb 2019
Posts: 732
Default

I've just tried cookie transfer right now on this site and its working here.
Facebook seems special. Do I need something special for Facebook?
Reply With Quote
  #10  
Old 11.08.2022, 18:56
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,918
Default

Quote:
Originally Posted by Cyberavater View Post
Do I need something special for Facebook?
Sorry, again:
1. It's working fine in JD.

2. We are unable to provide any help for creating special/Selenium solutions here.
Please ask on stackoverflow.com or similar websites.
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #11  
Old 11.08.2022, 19:02
Cyberavater Cyberavater is offline
JD Legend
 
Join Date: Feb 2019
Posts: 732
Default

Ofc! I've added "Off-topic" just for that.
BTW, I'm not talking about selenium, just how to get it done in a regular browser if it's not clear yet.

I'm just asking here since I got the idea from you guys and you have more experience. It's fine if it's not worth your time, I understand that.

I'll just wait for Jiaz if he has some suggestions.
Reply With Quote
  #12  
Old 11.08.2022, 19:03
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,918
Default

Good luck
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #13  
Old 11.08.2022, 20:01
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,289
Default

@Cyberavater: Please keep in mind that besides cookies there is also local storage. That's why I meant here
Quote:
Originally Posted by Jiaz View Post
please know that this approach might now work in browser, because JDownloader only does specific requests while browser has a full browser engine running all js that can result in different behaviour of the website.
Maybe the js on the site also checks local storage, which is empty then, and then redirects to login screen/fails to work.
Facebook makes use of localstorage, so maybe check stackoverflow.com/questions/13335967/export-data-in-localstorage-for-later-re-import
__________________
JD-Dev & Server-Admin
Reply With Quote
  #14  
Old 11.08.2022, 21:40
Cyberavater Cyberavater is offline
JD Legend
 
Join Date: Feb 2019
Posts: 732
Default

Okay, thanks for the help. I'll look into it.
Reply With Quote
  #15  
Old 12.08.2022, 13:32
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,289
Default

Quote:
Originally Posted by Cyberavater View Post
Okay, thanks for the help. I'll look into it.
You're welcome!
__________________
JD-Dev & Server-Admin
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 16:04.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.