Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23189

This program doesn't print the price, it just ends without printin anything at all

$
0
0
from selenium import webdriverfrom selenium.webdriver.common.by import Byfrom selenium.webdriver.support.ui import WebDriverWaitfrom selenium.webdriver.support import expected_conditions as ECdriver = webdriver.Chrome()driver.get("https://www.amazon.in/SAMSUNG-Galaxy-S23-Mint-Storage/dp/B0CJXPYJC3/")try:    price = WebDriverWait(driver, 10).until(        EC.presence_of_element_located((By.CLASS_NAME, "a-price-whole"))    )    print(price.text)finally:    driver.quit()

I believe it couldve been because the browser was closing before selenium could extract the data, but i tried to add a delay and it still didnt work.


Viewing all articles
Browse latest Browse all 23189

Trending Articles