This is the part of the website I want to scrape.
This is my python selenium code:
className = "_29hl"
try:
search = WebDriverWait(driver, 10).until(
EC.presence_of_all_elements_located((By.CLASS_NAME, className,))
)
print( search )
print( search[0] )
# the two print statement above print two different webElement objects
# why is that?
# I want to do something like this...
lists = search.direct_children
links = [ each.find_element_by_tag_name('a') for each in lists ]
for link in links:
link.click()
# other codes...
finally:
driver.quit()
When I select the className from the console, it returns a collection
So I select the first one, and it returns the <ul> and its <li> child elements I want to scrape
How can it be selected and iterate through <li> elements using python selenium?
My goal is to select the <a> inside each <li> and make a click on that


