I have a specific URL I want to scrape, however, a certain element doesn't load until the page is fully loaded and I am having trouble getting Selenium to find it:
from selenium import webdriver
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
driver = webdriver.Chrome(Insert Driver Path Here)
game_url = "https://rbsdm.com/stats/box_scores/?_inputs_&type=%22reg%22&away=%22ARI%22&home=%22SF%22&year=2020"
driver.get(game_url)
element = WebDriverWait(driver, 10).until(
EC.presence_of_element_located((By.CLASS_NAME, "table table-striped table-hover table-responsive"))
)
print(element)
The <div> that has the table I want has the ID qbs, which loads, however, it doesn't contain anything upon initial load, apparently. The table has the class name I use when making the element variable.
The page's data is definitely loaded after the 10-second window I give it, so I'm confused about this isn't working.