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
Thank you for this SDK!
It looks like either the jwt that is saved in the session_file I provide is either invalid or I'm instantiating something wrong.
session_file
Here's what I'm doing:
jwt
password=None
Traceback (most recent call last): File "test_duolingo", line 25, in <module> lingo = duolingo.Duolingo(username, password=None, jwt=jwt, session_file=session_file) File "/usr/local/lib/python3.9/site-packages/duolingo.py", line 66, in __init__ self._login() File "/usr/local/lib/python3.9/site-packages/duolingo.py", line 112, in _login raise DuolingoException("Login failed") duolingo.DuolingoException: Login failed
The SDK works perfectly fine if I use username/password each time I instantiate Duolingo
Here is the code:
import sys import json from pathlib import Path import duolingo username = "[REDACTED]" password = "[REDACTED]" session_file = "/some/absolute/path" session = Path(session_file) if session.is_file(): print("\033[95mUsing DuoLingo session...\033[0m") file = open(session_file, "r") jwt = json.load(file).get("jwt_session") lingo = duolingo.Duolingo(username, password=None, jwt=jwt, session_file=session_file) else: print("\033[95mLogging into DuoLingo...\033[0m") lingo = duolingo.Duolingo(username, password, session_file=session_file)
The text was updated successfully, but these errors were encountered:
login fail with jwt (fix KartikTalwar#119)
2f9303c
No branches or pull requests
Thank you for this SDK!
It looks like either the jwt that is saved in the
session_file
I provide is either invalid or I'm instantiating something wrong.Here's what I'm doing:
session_file
exists, parse it for thejwt
and pass that andsession_file
to duolingo.Duolingo instantiation. Explicitly settingpassword=None
The SDK works perfectly fine if I use username/password each time I instantiate Duolingo
Here is the code:
The text was updated successfully, but these errors were encountered: