-
Notifications
You must be signed in to change notification settings - Fork 3
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
Login issues #12
Comments
I met the same problem. |
Fixed in v0.4.2. Regarding your question, I believe that both 'JSESSIONID' and ''`[email protected]' are involved in the authorization process. |
I met the same problem in v0.4.2. |
It seems I solve it by setting validate_session=False again. |
@lan-qing Could you please provide more information? By setting |
Dear PhotonQuantum, Thanks for your reply. I installed [Clang 13.0.1 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pysjtu
>>> c = pysjtu.create_client(username="xxx", password="xxx")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "xxx/miniforge3/lib/python3.9/site-packages/pysjtu/client/__init__.py", line 71, in create_client
sess = Session(*args, **kwargs)
File "xxx/miniforge3/lib/python3.9/site-packages/pysjtu/session.py", line 122, in __init__
self.loads({"username": username, "password": password})
File "xxx/miniforge3/lib/python3.9/site-packages/pysjtu/session.py", line 429, in loads
self.login(self._username, self._password)
File "xxx/miniforge3/lib/python3.9/site-packages/pysjtu/session.py", line 368, in login
result = self._secure_req(
File "xxx/lib/python3.9/site-packages/pysjtu/session.py", line 85, in _secure_req
return ref()
File "xxx/miniforge3/lib/python3.9/site-packages/pysjtu/session.py", line 264, in post
return self.request(
File "xxx/miniforge3/lib/python3.9/site-packages/pysjtu/session.py", line 161, in request
self.login(self._username, self._password)
File "xxx/miniforge3/lib/python3.9/site-packages/pysjtu/session.py", line 359, in login
uuid = re.findall(r"(?<=uuid=).*(?=\")", login_page_req.text)[0]
IndexError: list index out of range
>>> pysjtu.__version__
'0.4.2' Is this sufficient to identify the problem? If anything more is helpful, I would be happy to provide it. |
When I try to login, it seems like the uuid cannot be defined correctly.
Login with username and password:
Login with cookies:
By the way, could you please tell me which one between JSESSIONID and [email protected] is the one that contains session info? As I'm a freshman, I might need your further help...tks
The text was updated successfully, but these errors were encountered: