link to full source code:
http://www.supremenewyork.com/shop/all/sweatshirts
Trying to scrape both the product element and the color of it from the site. I can already pull the name of the product and click that however I want to be able to pull all the products with that certain keyword in it, and then click the one in the color that i want. any help is appreciated.
Edit: what ive tried,
product = driver.find_elements_by_partial_link_text(keyword)
for item in product:
if item.parent.parent.find("p") == wanted_color:
item.get_attribute("href")
Error:
Traceback (most recent call last): File "C:/Users/B/PycharmProjects/BasicSelenium/test.py", line 17, in <module>
if item.parent.parent.find("p") == color: AttributeError: 'WebDriver' object has no attribute 'parent'
