gpt4 book ai didi

python - 无法点击按钮

转载 作者:行者123 更新时间:2023-11-28 17:59:07 26 4
gpt4 key购买 nike

我正在尝试单击下面给出的 xpath 提供的按钮。它显示此错误:

raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <a href="http://gogoanime.io/category/one-piece#disqus_thread">...</a> is not clickable at point (650, 736). Other element would receive the click: <div style="position:fixed;z-index:9999;background:#ffc119;bottom:0;text-align:center;color:#000;width:100%;padding:10px 0;font-weight:600;">...</div>

在命令中。

import requests
from bs4 import BeautifulSoup
from selenium import webdriver

driver = webdriver.Chrome()
url = "https://www5.gogoanime.tv/category/one-piece"
driver.maximize_window()
driver.get(url)
content = driver.page_source.encode('utf-8').strip()
soup = BeautifulSoup(content,'html.parser')
#btn_comment_div = soup.find('div',{'class':'specialButton'})
#btn_comment = btn_comment_div.find('a')
btn_comment = driver.find_element_by_xpath('/html/body/div[2]/div/div/section/section[1]/div[1]/div[7]/div[1]/div/div/a')
btn_comment.click()

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com