Hello i have a problem and searched for a little while in the internet, but most of the times the answers could not helped me.
I want to store/copy the latest price from a site (Webscraping, Kinguin)
Code:
from time import sleep
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome('.\driver\chromedriver.exe')
driver.get("https://www.kinguin.net")
try:
KingInput = driver.find_element_by_id('search')
KingInput.send_keys('far cry 5')
webdriver.ActionChains(driver).send_keys(Keys.ENTER).perform()
# The Error happens here
Kprice = driver.find_element_by_class_name('price add-tax-rate relative-price-container').text()
print(type(Kprice))
print(Kprice)
sleep(5)
driver.close()
except:
print("Error")
I hope you can help me and I'm struggling for while.
Thanks in advance