You can try to wait until the required <table> and becomes visible:
from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait as wait from selenium.webdriver.support import expected_conditions as EC driver.get("https://www.zillow.com/homedetails/689-Luis-Munoz-Marin-Blvd-APT-508-Jersey-City-NJ-07310/108625724_zpid/") table = wait(driver, 10).until(EC.visibility_of_element_located((By.XPATH, '//div[@id="hdp-price-history"]//table'))) print(table.text)
Output:
DATE EVENT PRICE $/SQFT SOURCE 05/03/17 Listed for sale $750,000+159% $534 KELLER WILLIAM... 06/15/11 Sold $290,000-38.3% $206 Public Record 10/14/05 Sold $470,000 $334 Public Record
You can also analyze it without using BeautifulSoup , for example
print(table.find_element_by_xpath('.//td[text()="Listed for sale"]/following::span').text)
Output:
$750,000
or
print(table.find_element_by_xpath('.//td[text()="Sold"]/following::span').text)
Output:
$290,000
source share