Facebook发帖输入内容更改为fill
This commit is contained in:
@@ -490,7 +490,8 @@ def playwright_post(cookies, content, image_key=None):
|
||||
if not image_key:
|
||||
page.click('''//span[contains(text(), "What's on your mind")]''')
|
||||
_edit_privacy(page)
|
||||
page.type('''//div[contains(@aria-placeholder, "What's on your mind")]''', content, delay=50,
|
||||
# 修改后 (使用 fill)
|
||||
page.fill('//div[contains(@aria-placeholder, "What\'s on your mind")]', content,
|
||||
timeout=300000)
|
||||
page.click('//div[@aria-label="Post"]', timeout=300000)
|
||||
time.sleep(15)
|
||||
|
||||
Reference in New Issue
Block a user