-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use cookie instead of credentials for authentication #41
base: main
Are you sure you want to change the base?
Conversation
Hi, does this fix the issue found in #20 ? |
Hey @jowie. Not really. #20 has been fixed since #29 (I just forgot to close it). You are kind of right, however, in that this PR makes the issue obsolete as a normal login no longer exists. The current error message still needs to be updated to reflect the new authorization method (which will happen before this PR is merged) but that isn't really related to #20. |
@jowie I forgot to mention that a similar error still occurs for some users when they use the current version with username and password login, due to Netflix' new use of reCAPTCHA. In that case, the issue isn't incorrect credentials but just reCAPTCHA doing its job. This PR does fix that issue. For a more detailed discussion about that topic, please take a look at LBBO/netflix-migrate#37. |
@LBBO thank you for the helpful info! I used the release version yesterday and managed to export my old profile JSON, but unfortunately was unable to import it into my new account due to the error. I'd love to give this branch a go, but I'm afraid I don't know how to run JS in the terminal (on a Mac)... Could you point me to some advice as to how to install and run this code? And Also if you have any information on how to retrieve a cookie from a browser such as Chrome or Safari? (although I'm sure I could look that last bit up if necessary) I appreciate this is not your responsibility but I'm just very keen to try and migrate my old profile now I am not piggybacking off my parent's Netflix account 😉 thank you!
|
Hey @jowie, it sounds like you want to just migrate your account data and that is precicely what netflix-migrate is there for. This repository just provides the JS library netflix-migrate is built upon so that others can build their own software using Netflix' services. If I am correct and you just want to migrate, this discussion should probably take place over there. To answer your question, though: I have written an explenation on how to use the new netflix-migrate version in the updated README you can find here. As for the cookies: Those should all just be one single string, such as
If you use Chrome, it is important that you manually select the entire string as explained in the README and copy it using Cmd + C instead of just right-clicking the value and selecting "Copy value", as that actually decodes the cookie before copying it. Everything else should be explained well enough in the README. Please let me know if you run into any more problems. |
Hi @LBBO - thanks for your reply! Sorry I'm off-topic here... I followed a link in an issue over there and didn't realise I was chatting in the wrong repo! Thanks for the advice... I will give it a go today and if I have any problems I will message you directly or over on the correct repo. Thanks again! |
Hi @LBBO, |
Hey @CHarnel, it'll be merged once enough users report that it works for them. There are also a few minor adjustments I want to make before then, but they should be quick. Also, nothing is going to happen in the next week as I have an exam coming up. |
@LBBO ... I have tried this new beta version i..e
My account is not inactive because its brand new account and I can watch netflix with it. In fact, I have another active account and I get the same error when I use the cookie from that account to try and login as well Any ideas? here is the full stacktrace
here is the code that I'm using to test var Netflix = require("netflix2")
var cookies = "my-really-long-cookie"
cookies = cookies.split(/\r?\n/gm).join('').trim()
var credentials = {cookies}
netflix = new Netflix()
netflix.login(credentials)
.then(() => console.log("logged in succesfully"))
.catch(() => console.log("logged in FAILED")) |
Hey having the same issue here. Did you manage to find a fix for it? |
@itskush ... I havent managed to find a solution yet |
I'm trying to use the cookie from my account on netflix2 and email and password on netflix-migrate and I'm receiving the same issue Cannot read property 'data' of undefined |
I got it working, but instead of using the So I debug printed the URL and visited e.g. https://www.netflix.com/api/shakti/v74c04a5c/profiles (you need to debug print to get the current version of the api). And then checked the cookies from Network tab sent with the request. |
This PR changes the authorization method from credentials to cookies. This means the user will have to login manually and then extract the cookies set in their browser by Netflix. Sadly, this is now necessary, as Netflix added reCAPTCHA to their login form, as described in #37.
Fixes #37; corresponds to LBBO/netflix-migrate#54