【发布时间】:2021-03-14 18:24:27
【问题描述】:
我想将颜色 HSB 值映射到英文颜色名称和色调名称。我发现的一个资源是 https://www.color-blindness.com/color-name-hue/ 我正在使用 Selenium 来抓取它。 似乎我找不到我感兴趣的元素。 这是我的尝试:
import selenium
from selenium import webdriver
driver = webdriver.Chrome()
driver.get('https://www.color-blindness.com/color-name-hue/')
driver.implicitly_wait(60)
driver.find_element_by_css_selector("input#cp1_Hue")
其他一些尝试:
driver.find_element_by_id("cp1_Hue")
我不断收到此错误消息:
NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"input#cp1_Hue"} (Session info: chrome=89.0.4389.82)
有人遇到过同样的问题吗?
提前致谢!
【问题讨论】:
-
解决方法已经写在下面了
-
尝试this link 从帖子中的链接中抓取您想要的任何内容。好消息是您可以在请求模块中使用此链接,因为此处提供的内容是静态的。
标签: python selenium web-scraping