Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
luolongfei committed Jan 13, 2022
2 parents 0c354d6 + 329a2c9 commit c9522d5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions netflix.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ def __forgot_password(self, netflix_username: str):

forgot_pwd = self.find_element_by_id('forgot_password_input')
forgot_pwd.clear()
Netflix.send_keys_delay_random(forgot_pwd, netflix_username)
forgot_pwd.send_keys(netflix_username)

time.sleep(1)

Expand Down Expand Up @@ -482,19 +482,19 @@ def __reset_password(self, curr_netflix_password: str, new_netflix_password: str

curr_pwd = self.find_element_by_id('id_currentPassword')
curr_pwd.clear()
Netflix.send_keys_delay_random(curr_pwd, curr_netflix_password)
curr_pwd.send_keys(curr_netflix_password)

time.sleep(1)

new_pwd = self.find_element_by_id('id_newPassword')
new_pwd.clear()
Netflix.send_keys_delay_random(new_pwd, new_netflix_password)
new_pwd.send_keys(new_netflix_password)

time.sleep(1)

confirm_new_pwd = self.find_element_by_id('id_confirmNewPassword')
confirm_new_pwd.clear()
Netflix.send_keys_delay_random(confirm_new_pwd, new_netflix_password)
confirm_new_pwd.send_keys(new_netflix_password)

time.sleep(1.1)

Expand All @@ -517,13 +517,13 @@ def input_pwd(self, new_netflix_password: str) -> None:
"""
new_pwd = self.find_element_by_id('id_newPassword')
new_pwd.clear()
Netflix.send_keys_delay_random(new_pwd, new_netflix_password)
new_pwd.send_keys(new_netflix_password)

time.sleep(2)

confirm_new_pwd = self.find_element_by_id('id_confirmNewPassword')
confirm_new_pwd.clear()
Netflix.send_keys_delay_random(confirm_new_pwd, new_netflix_password)
confirm_new_pwd.send_keys(new_netflix_password)

time.sleep(1)

Expand Down Expand Up @@ -926,7 +926,7 @@ def pwd_reset_request_mail_listener(self, netflix_account_email) -> str or None:
# 拉取最新邮件
resp = self.__fetch_mail(netflix_account_email)

if self.is_password_reset_request(resp['text']):
if resp and self.is_password_reset_request(resp.get('text', '')):
logger.info('Netflix 账户 {} 已收到请求重置密码的邮件,开始提取重置链接', netflix_account_email)

match = Netflix.RESET_URL_REGEX.search(resp['text'])
Expand Down
2 changes: 1 addition & 1 deletion utils/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
@time 10:02
"""

__version__ = 'v0.7.1'
__version__ = 'v0.7.2'

0 comments on commit c9522d5

Please sign in to comment.