From 02aba859b26378ebbb13a7a36dec1caa655715ef Mon Sep 17 00:00:00 2001 From: luolongfei Date: Thu, 13 Jan 2022 17:43:40 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E5=A4=A7=E5=B9=85?= =?UTF-8?q?=E6=8F=90=E5=8D=87=E5=AF=86=E7=A0=81=E9=87=8D=E7=BD=AE=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=80=A7=E8=83=BD=EF=BC=8C=E6=8F=90=E9=AB=98=E6=95=88?= =?UTF-8?q?=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- netflix.py | 12 ++++++------ utils/version.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/netflix.py b/netflix.py index d9d0f13..1591a24 100644 --- a/netflix.py +++ b/netflix.py @@ -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) @@ -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) @@ -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) diff --git a/utils/version.py b/utils/version.py index fee2f34..2c57dae 100644 --- a/utils/version.py +++ b/utils/version.py @@ -7,4 +7,4 @@ @time 10:02 """ -__version__ = 'v0.7.1' +__version__ = 'v0.7.2' From 329a2c91b5cd7dffdd2aa7385199dc97cb2c702c Mon Sep 17 00:00:00 2001 From: luolongfei Date: Thu, 13 Jan 2022 18:01:04 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E9=87=8D=E7=BD=AE?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=E9=82=AE=E4=BB=B6=E4=B8=8D=E5=8F=8A=E6=97=B6?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=8A=9B=E5=87=BA=E5=BC=82=E5=B8=B8=E7=9A=84?= =?UTF-8?q?=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- netflix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netflix.py b/netflix.py index 1591a24..8beec20 100644 --- a/netflix.py +++ b/netflix.py @@ -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'])