I'm trying to get the dates on ebay listings (see green square around date in picture) using selenium and find_element_by_xpath but I am having a hard time. I'm trying to get the dates for each listing. I am using Python and Firefox browser.
I thought I could just do the following:
date_x = (driver.find_element_by_xpath("(//span[@class='s-item__ended-date s-item__endedDate'])[2]").text)
but it doesn't work. Not sure how to grab each date, is there something I am doing wrong or an easier way of doing this; if someone could help advise, would be appreciated.
