#1
|
|||
|
|||
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. |
#2
|
||||
|
||||
@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 |
#3
|
|||
|
|||
"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 16:28. |
#4
|
||||
|
||||
Quote:
Quote:
__________________
JD-Dev & Server-Admin |
#5
|
||||
|
||||
What exactly does fail? what error do you get? are you sure you set all cookies correct?
__________________
JD-Dev & Server-Admin |
#6
|
|||
|
|||
>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. |
#7
|
||||
|
||||
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 |
#8
|
|||
|
|||
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)" |
#9
|
|||
|
|||
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? |
#10
|
||||
|
||||
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 |
#11
|
|||
|
|||
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. |
#12
|
||||
|
||||
Good luck
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#13
|
||||
|
||||
@Cyberavater: Please keep in mind that besides cookies there is also local storage. That's why I meant here
Quote:
Facebook makes use of localstorage, so maybe check stackoverflow.com/questions/13335967/export-data-in-localstorage-for-later-re-import
__________________
JD-Dev & Server-Admin |
#14
|
|||
|
|||
Okay, thanks for the help. I'll look into it.
|
#15
|
||||
|
||||
You're welcome!
__________________
JD-Dev & Server-Admin |
|
|