login failing "Email or password incorrect"
However, I have confirmed 5 ways from sunday that the email and password are correct. I experimented with adding urlencoding to the user and pass but that does not seem to be helping. Any ideas? Would really like to be able to use your library to script some of my piazza posts.
tagging @savantes1 for the most recent PR about login.
I was having a login issue as well. However, it seems to be working on my end after I went into rpc.py and changed line 81 from data=f'from=%2Fsignup&email={email}&password={password}&remember=on&csrf_token={csrf_token}'
to
data={
'csrf_token': csrf_token,
'email': email,
'password': password
}
Let me know if this helps.
It worked for me. Thanks!
Happy to accept the above fix as a PR if anyone would like to put one forth.
hey @hfaran! I have a question about this project, where can i reach you, i have a question about how this works, can i get ur email or smth?
@mrnhtyzgld Feel free to ask any questions here or open a new issue on Github if you have a different question
I'll try to take a look at this today or tomorrow and, hopefully, put in a PR
@hfaran you didnt return to my issue, can you return when available? Sorry for asking.
So, clearly, when I said "today or tomorrow", I meant "next week" ;)
I'm pretty sure the pull request I just submitted should resolve this problem
#71 doesn't/shouldn't fix this issue, since changing f-strings to str.format is merely a Python syntax difference (with better backwards-compatibility for old Python versions) that doesn't change the actual functionality/submission at all. if that were really the issue then the error would be a Python syntax error, not a "login failed" error.
I'm not sure whether the underlying cause for this specific issue is since the author mentioned they tried urlencoding; maybe it wasn't done correctly? because afaik the only difference between manually string-encoding the form data and using a dict is whether the payload gets urlencoded behind the scenes by requests.
anyway, i submitted PR #72 to implement @EddieJ03's suggested fix (https://github.com/hfaran/piazza-api/issues/68#issuecomment-1868566700).