diff --git a/finance_dl/paypal.py b/finance_dl/paypal.py index 31b120d..3148c38 100644 --- a/finance_dl/paypal.py +++ b/finance_dl/paypal.py @@ -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