Issue
I am new to scraping data from a web site and I am trying to get specific data. Here I am trying to get the colors in each row of soup.find('div', class_ = "color-swatch-row type-swatch-image")
:
Here's the website: https://www.hoka.com/en/us/mens- everyday-running-shoes/rincon-3/1119395.html
This is what I tried:
for row in soup.find('div', class_ = "color-swatch-row type-swatch-image"):
color = row.find('title')
print(color)
Solution
You can try to switch the last line for:
print(color.text)
Let me know if it works!
Answered By - Polaretti
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.