Python Splinter cli

2024-05-16 04:57:09 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图用下面的python脚本点击列表项。你知道吗

from splinter import Browser

from bs4 import BeautifulSoup as bs
url ='https://astrogeology.usgs.gov/search/results?q=hemisphere+enhanced&k1=target&v1=Mars'
browser.visit(url)

browser.find_by_css("a.product-item").click()

这给了我WebDriverException下面的信息。需要帮忙吗?你知道吗

Message: unknown error: Element <a href="/search/map/Mars/Viking/cerberus_enhanced" class="itemLink product-item">...</a> is not clickable at point (54, 228). Other element would receive the click: <section id="results-accordian" class="block">...</section>


Tags: fromimportbrowser脚本urlsearchsectionproduct
1条回答
网友
1楼 · 发布于 2024-05-16 04:57:09

我是新的,但当我尝试你的代码,并得到相同的错误。我浏览了dev工具,发现元素的位置不正确,因此混淆了selenium。你知道吗

这可能是help

相关问题 更多 >