I have the following code saved to a local html file
<object id="PriceAdvisorFrame" type="image/svg+xml" data="https://www.kbb.com/Api/3.9.448.0/71071/vehicle/upa/PriceAdvisor/meter.svg?action=Get&intent=buy-used&pricetype=Private Party&zipcode=99517&vehicleid=439604&hideMonthlyPayment=True&condition=verygood&mileage=11795" style="width: 100%;"></object> I am trying to extract the cost from the html when the it is executed a chrome browser. Html code I am trying to parse out is shown below. However this code does not appear when the file is requested using selenium.
<text xmlns="http://www.w3.org/2000/svg" text-anchor="middle" font-size="14" font-weight="700" fill="#333333" y="-8">$27,938</text> <text xmlns="http://www.w3.org/2000/svg" text-anchor="middle" font-size="14" font-weight="400" fill="#333333" y="-26">Private Party Value</text> <text xmlns="http://www.w3.org/2000/svg" text-anchor="middle" font-size="20" font-weight="700" fill="#ffffff" y="-48">$26,995 - $28,888</text> <text xmlns="http://www.w3.org/2000/svg" text-anchor="middle" font-size="14" font-weight="400" fill="#ffffff" y="-68.8">Private Party Range</text> Here is my code thus far:
options = webdriver.ChromeOptions() options.add_argument('headless') user_agent = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.50 Safari/537.36' options.add_argument('user-agent={0}'.format(user_agent)) driver = webdriver.Chrome(chrome_options=options) driver.get('file:///F:/Onedrive/Python/KBB/test.html') print(driver.find_element_by_css_selector('text').text) Any ideas on how to make this work?

https://www.kbb.com/...? Maybe you will no needSeleniumbutrequestsand it will work faster. But remember to use&instead of&