编辑隐私设置异常捕获
This commit is contained in:
@@ -78,12 +78,16 @@ def _change_language(page):
|
||||
|
||||
|
||||
def _edit_privacy(page):
|
||||
try:
|
||||
sleep(1, 2)
|
||||
page.click('//div[contains(@aria-label, "Edit privacy")]')
|
||||
sleep(1, 2)
|
||||
page.click('//div[@aria-label="Select audience"]//span[text()="Public"]')
|
||||
page.click('//div[@aria-label="Done"]')
|
||||
sleep(1, 2)
|
||||
except Error as e:
|
||||
logger.error(f"Error editing privacy settings: {e}")
|
||||
raise OperationFailed("编辑隐私设置失败") from e
|
||||
|
||||
|
||||
def parse_cookies(cookies):
|
||||
|
||||
Reference in New Issue
Block a user