You can find the graph I want to scrape at this address: https://www.algopoly.com/res-rapor.html
My desire is that:
KARABEL RES 5.23 TL/MWh
GÖKÇEDAĞ RES 21.28 TL/MWh
.
.
.
HAMSİ RES 486.47TL/MWh
I've tried:
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
url = 'https://www.algopoly.com/res-rapor.html'
options = webdriver.ChromeOptions()
options.add_argument("start-maximized")
options.add_experimental_option('excludeSwitches', ['enable-logging'])
driver = webdriver.Chrome(options=options, service=Service(ChromeDriverManager().install()))
driver.get(url)
WebDriverWait(driver, 20).until(EC.presence_of_all_elements_located((By.XPATH, "//iframe[@id='518061208646906024']")))
iframe_element = driver.find_element(By.XPATH, "//iframe[@id='518061208646906024']")
data = driver.switch_to.frame(iframe_element)
print(data)
I can't get anything. Is it possible to scrape this chart with selenium?