Skip to content

Commit

Permalink
[session] updated page to get email
Browse files Browse the repository at this point in the history
its backward compatible with old account interface
  • Loading branch information
CastagnaIT committed Apr 15, 2024
1 parent fe3b0d3 commit 7944699
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions resources/lib/services/nfsession/session/access.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ def login_auth_data(self, data=None, password=None):
'If you have just done "Sign out of all devices" from Netflix account settings '
'wait about 10 minutes before generating a new AuthKey.') from exc
# Get the account e-mail
page_response = self.get('your_account').decode('utf-8')
email_match = re.search(r'account-email[^<]+>([^<]+@[^</]+)</', page_response)
page_response = self.get('account_security').decode('utf-8')
email_match = re.search(r'>([^<]+@[^</]+)<', page_response)
email = email_match.group(1).strip() if email_match else None
if not email:
raise WebsiteParsingError('E-mail field not found')
Expand Down
6 changes: 3 additions & 3 deletions resources/lib/services/nfsession/session/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
'use_default_params': False,
'add_auth_url': None,
'accept': 'text/html,application/xhtml+xml,application/xml'},
'your_account':
{'address': '/YourAccount',
'account_security':
{'address': '/account/security',
'is_api_call': False,
'use_default_params': False,
'add_auth_url': None,
Expand All @@ -82,7 +82,7 @@
'is_api_call': False,
'use_default_params': False,
'add_auth_url': None,
'accept': 'application/json, text/javascript, */*'},
'accept': '*/*'},
'profile_lock':
{'address': '/api/shakti/mre/profileLock',
'is_api_call': False,
Expand Down

0 comments on commit 7944699

Please sign in to comment.