We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
[Fatal] Could not authenticate to linkedin. Set credentials in your environment variables
The text was updated successfully, but these errors were encountered:
I think it's an issue with the new Linkedin authentication system. I've edited the code a bit and it works for me now.
Change the authentication function to this:
# Authentication Fix def authenticate(): print("[Info] Initiating LinkedIn authentication...") # Use credentials from config file instead of environment variables username = config.linkedin['username'] password = config.linkedin['password'] if not username or not password: raise ValueError("LinkedIn username and password must be set in config.py") url = "https://www.linkedin.com/checkpoint/lg/login-submit" csrf = "00000000-8a9a-474e-8bc1-6f10272b5fe6" postdata = { 'session_key': username, 'session_password': password, 'loginCsrfParam': csrf, } cookies = {'bcookie': 'v=2&%s' % csrf} # Login Request r = requests.post(url, postdata, cookies=cookies, allow_redirects=False) try: session = r.cookies.get('li_at') if session: print(f"[Info] Obtained new session: {session[:25]}...") return {'li_at': session} else: raise RuntimeError("[Fatal] Could not authenticate to LinkedIn.") except Exception as e: raise RuntimeError(f"[Fatal] Authentication failed: {e}")
Then you can replace the config with your email and password. It should work then! :)
Sorry, something went wrong.
No branches or pull requests
[Fatal] Could not authenticate to linkedin. Set credentials in your environment variables
The text was updated successfully, but these errors were encountered: