wwhtrbbtt / RedditPy

RedditPy aims to be a unofficial open-source python API for reddit, that doesn't require any tokens except your password and username.
MIT License
3 stars 0 forks source link

Error during account login #1

Open emre-aktas opened 10 months ago

emre-aktas commented 10 months ago

I get this error message when logging into the account, but everything is correct. I can't figure out why.

{"reason": "INCORRECT_USERNAME_PASSWORD", "code": 400, "explanation": "incorrect username or password"}

Davis-3450 commented 10 months ago

Show a snippet of your code, censor the password.

wwhtrbbtt commented 10 months ago

Hey, I don't maintain the library anymore, and it can very well be that they changed something in the last 3 years.

emre-aktas commented 10 months ago

I solved the problem. @Davis-3450 @wwhtrbbtt Thank you for your concern.

I was doing requests with curl_cffi library. I was using chrome110 impersonate. When I changed it to safari15_5 the problem was solved.

https://github.com/lwthiker/curl-impersonate/blob/main/chrome/curl_safari15_5 https://github.com/lwthiker/curl-impersonate https://github.com/yifeikong/curl_cffi

Davis-3450 commented 10 months ago

Nice, there are some other issues when the account's Reddit mode is set to old, would be cool to fork this.

I solved the problem. @Davis-3450 @wwhtrbbtt Thank you for your concern.

I was doing requests with curl_cffi library. I was using chrome110 impersonate. When I changed it to safari15_5 the problem was solved.

https://github.com/lwthiker/curl-impersonate/blob/main/chrome/curl_safari15_5 https://github.com/lwthiker/curl-impersonate https://github.com/yifeikong/curl_cffi

wwhtrbbtt commented 10 months ago

Ill add good TLS and update the headers myself, and test everything. Now that the official API got basically nuked, this could be useful again ^^

wwhtrbbtt commented 10 months ago

I would welcome if someone forked this project. Login works again now, and I made some other parts of the code better, but I don't have the time to make everything good at the moment haha :)

emre-aktas commented 10 months ago

@wwhtrbbtt Hi, thanks for update! Have you tried using a proxy in the latest version of your code? When I tried to use the tls-client library you used in a pure form, it could not connect to the proxy. I wondered if you solved this situation.