The Password class handles password recovery for Spotify accounts. It allows users to initiate the password reset process by providing either an email or username and handling the necessary captcha solving.
-
cfg:
Config
A configuration object containing the solver, client, and logger instances. -
email:
Optional[str]
The email address to use for recovery. Defaults toNone. -
username:
Optional[str]
The username to use for recovery. Defaults toNone.Note: Either
emailorusernamemust be provided.
Initializes the Password class with configuration settings and recovery credentials.
-
Args:
cfg:Config
Configuration object containing thesolver,client, andlogger.email:Optional[str]
The email address to use for recovery (optional).username:Optional[str]
The username to use for recovery (optional).
-
Raises:
ValueErrorif neitheremailnorusernameis provided.
Performs the complete password reset process, including captcha solving.
- Raises:
PasswordErrorif the captcha solver is not set, or if solving the captcha or resetting the password fails.