This question is a follow up to my previous question (Inconsistency in scraping through <div>'s in Selenium). I'm working on scraping all of the Air Jordan Data off of grailed.com (https://www.grailed.com/designers/jordan-brand/hi-top-sneakers). I am storing the size, model, url, and image url in an object. I currently have a program that scrolls through the entire feed and fetches all of this. Everything works except finding the image url. The image URL seems to require inducing an explicit wait, which @KunduK suggested. I'm trying to implement his solution so that I can pull each image in my for loop:
while True and len(sneakers) < sneaker_count:
driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")
# Get sneakers currently on page and add to sneakers list
feed = driver.find_elements_by_class_name('feed-item')
images = WebDriverWait(driver, 10).until(
EC.visibility_of_all_elements_located((By.CSS_SELECTOR, ".feed-item .listing-cover-photo>img")))
for item in feed:
...
Currently the code fetches the image in a group at once. I am trying to fetch the image during the "for item in feed" block. I want something like images = WebDriverWait(driver, 10).until(EC.visibility_of_elements_located((By.SOME SELECTOR", ???)))
but I really don't know how to find these using the 'item' element. Can anyone help?