登录失败, 账号密码失败进行截图
This commit is contained in:
@@ -978,7 +978,7 @@ def playwright_m_login(username, password, code_2fa=None):
|
|||||||
failed_login = page.query_selector(failed_login_selector)
|
failed_login = page.query_selector(failed_login_selector)
|
||||||
if failed_login:
|
if failed_login:
|
||||||
# 登录失败, 返回失败信息
|
# 登录失败, 返回失败信息
|
||||||
page.screenshot(path=f'./log/screenshot/{username}_{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())}_login_failed.png')
|
page.screenshot(path=f'./log/screenshot/{username}_{time.strftime("%Y-%m-%d%H-%M-%S", time.localtime())}_login_failed.png')
|
||||||
logger.info(f"用户名:{username} 密码错误 {failed_login.text_content()}")
|
logger.info(f"用户名:{username} 密码错误 {failed_login.text_content()}")
|
||||||
raise OperationFailed(failed_login.text_content())
|
raise OperationFailed(failed_login.text_content())
|
||||||
|
|
||||||
@@ -1138,7 +1138,7 @@ if __name__ == '__main__':
|
|||||||
# # # 视频链接的帖子点赞
|
# # # 视频链接的帖子点赞
|
||||||
# print(playwright_like(cookies, "https://www.facebook.com/groups/1070754870427928/permalink/1873461830157224/"))
|
# print(playwright_like(cookies, "https://www.facebook.com/groups/1070754870427928/permalink/1873461830157224/"))
|
||||||
#
|
#
|
||||||
cookies = playwright_m_login('61583069571290', '47lfsryRmI', 'IJ6YM5MX6HEMRRIDSNUMSCEBJEIHVH3R')
|
cookies = playwright_m_login('61583069571290', '47lfsr123yRmI', 'IJ6YM5MX6HEMRRIDSNUMSCEBJEIHVH3R')
|
||||||
print(cookies)
|
print(cookies)
|
||||||
# pass
|
# pass
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user