修复视频发帖
This commit is contained in:
@@ -384,10 +384,10 @@ def retry_get_new_video(page, cookies, post_count):
|
||||
try:
|
||||
# 尝试点击视频
|
||||
comment_buttons = page.query_selector_all(
|
||||
'//div[@aria-label="Video player"]')
|
||||
'//div[@aria-label="Leave a comment"]')
|
||||
if comment_buttons:
|
||||
# 使用js去点击第一个评论按钮
|
||||
element = page.query_selector_all('//div[@aria-label="Video player"]')[0]
|
||||
element = page.query_selector_all('//div[@aria-label="Leave a comment"]')[0]
|
||||
page.evaluate('(element) => element.click()', element)
|
||||
time.sleep(random.randint(3, 5))
|
||||
page.reload()
|
||||
|
||||
Reference in New Issue
Block a user