I've tried a couple different routes to get this to work but I've had no luck.
1)
driver= webdriver.PhantomJS(executable_path=r'C:\Users\x\Downloads\phantomjs-2.1.1-windows\phantomjs-2.1.1-windows\bin\phantomjs.exe')
driver.get('https://www.drf.com/race-results')
elements = driver.find_elements_by_xpath("//div[@class='handicappingBottom']")
for item in elements: print(item)
*Returns an empty list
I then read up a bit and feel like the webpage isn't fully loading those items so I tried multiple variants of this:
elements = ui.WebDriverWait(driver, 45).until(EC.visibility_of_all_elements_located((By.CLASS_NAME, "handicappingBottom")))
Ideally I'm trying to scrape the current horse race locations into a list in a program I'm mocking up. Any help at all would be greatly appreciated. I'm new-ish to python and even newer than that to webscraping. Thanks a ton in advance!