Skip to content
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

cloudscraper, update csrf_regexp, auth dict #21

Closed
wants to merge 1 commit into from
Closed

cloudscraper, update csrf_regexp, auth dict #21

wants to merge 1 commit into from

Conversation

UnusualPi
Copy link

handling for cloudflare bot protection
update csrf_regexp for new page format
update auth payloads for new dict structure

@coding4z
Copy link

@haochi any chance you can review/approve this PR? Many thanks for providing this library!

@ecoen66
Copy link

ecoen66 commented Dec 24, 2021

+1

1 similar comment
@anthonysfancher
Copy link

+1

@sanghviharshit
Copy link

I think cloudscraper needs to be listed in requirements

@jcguu95
Copy link

jcguu95 commented Feb 3, 2022

Also there's a typo in line 60 of main. It should be

        pc.authenticate_password(email, password)

@BigSpringSnyder
Copy link

I want to use this API and open the account every morning using Selenium automatically. Using API, I wan to download all transactions, included just showed up in the account (but not fully posted) and balances of all the accounts. I would like to know few things.

  1. Can I know if it will work. Can API bypass the 2FA and login automatically?
  2. If I login in the morning after the banking hours, do all the transactions updated but not fully posted get downloaded?
  3. Can Posted balance and Available balance both be downloaded?

Thanks in advance.
Jay

@shubhampatwa30
Copy link

I am unable to login using the latest pull #21 .
It gave me this error first. ERROR:root:[Errno 2] No such file or directory: 'session.json'
If I create a json file with that name with {} value, it gives me this error personalcapital.personalcapital.LoginFailedException.
I tried to debug :
print(initial_csrf)
print(csrf)
print(auth_level)
Output:
None
None
None
Please help.

@hammem
Copy link

hammem commented Jul 20, 2022

@UnusualPi , I also encountered this issue and realized just updating the User-Agent will satisfy CloudFlare's checks (see #24 ). I'm sure there are many other ways to address, but the User-Agent tweak avoids adding a dependency to the library.

@UnusualPi
Copy link
Author

@UnusualPi , I also encountered this issue and realized just updating the User-Agent will satisfy CloudFlare's checks (see #24 ). I'm sure there are many other ways to address, but the User-Agent tweak avoids adding a dependency to the library.

I like this better than my solution, much cleaner without a new dependency. I assume the user agent validation is the primary reason cloud flare would catch it so should work for most.

@brodia10
Copy link

I am unable to login using the latest pull #21 . It gave me this error first. ERROR:root:[Errno 2] No such file or directory: 'session.json' If I create a json file with that name with {} value, it gives me this error personalcapital.personalcapital.LoginFailedException. I tried to debug : print(initial_csrf) print(csrf) print(auth_level) Output: None None None Please help.

I'm experiencing the same errors in the same situations.

@hammem
Copy link

hammem commented Jul 25, 2022

I'm experiencing the same errors in the same situations.

@brodia10 , try using #24 , it may resolve the issues

@brodia10
Copy link

I'm experiencing the same errors in the same situations.

@brodia10 , try using #24 , it may resolve the issues

@hammem thank you this worked wonderfully 👍

@UnusualPi UnusualPi closed this by deleting the head repository Mar 11, 2023
@banool
Copy link

banool commented Apr 13, 2023

Looks like @UnusualPi deleted their fork of this repo. I made the same changes they made in my own repo here: https://github.com/banool/personalcapital.

@hammem
Copy link

hammem commented Apr 14, 2023

@banool , I think they deleted it to use the changes put up in #24 . You may find this works well (at least it did for me as recently as this week).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.