Skip to content

Commit

Permalink
PayPal CSRF token embedding change
Browse files Browse the repository at this point in the history
  • Loading branch information
Zburatorul committed Oct 19, 2023
1 parent 4b8e28a commit 921ca75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions finance_dl/paypal.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ def get_csrf_token(self):
logging.info('Getting CSRF token')
self.driver.get('https://www.paypal.com/myaccount/transactions/')
# Get CSRF token
body_element, = self.wait_and_locate((By.ID, "__react_data__"))
attribute_object = json.loads(body_element.get_attribute("data"))
body_element, = self.wait_and_locate((By.ID, "__APP_DATA__"))
attribute_object = json.loads(body_element.get_attribute("innerHTML"))
self.csrf_token = attribute_object["_csrf"]
return self.csrf_token

Expand Down

0 comments on commit 921ca75

Please sign in to comment.