Я использую веб-драйвер селена для извлечения таблицы из веб-страницы, ниже приведен мой сценарий
from selenium import webdriver
from bs4 import BeautifulSoup
import requets
import pandas as pd
from selenium.webdriver.support.ui import WebDriverWait
import time, sys
driver = webdriver.Chrome()
driver.implicitly_wait(20)
URL = 'https://www.ccee.org.br/portal/faces/pages_publico/o-que-fazemos/como_ccee_atua/precos/precos_medios?_adf.ctrl-state=7e1fw5zdn_14&_afrLoop=19197915280379#!%40%40%3F_afrLoop%3D19197915280379%26_adf.ctrl-state%3D7e1fw5zdn_18'
driver.get(URL)
soup = BeautifulSoup(driver.page_source, "html.parser")
time.sleep(10)
table = soup.find('table')
list_of_rows = []
for row in table.findAll('tr'):
list_of_cells = []
for cell in row.findAll(["td"]):
text = cell.text
list_of_cells.append(text)
list_of_rows.append(list_of_cells)
for item in list_of_rows:
' '.join(item)
Data = pd.DataFrame(list_of_rows)
Export_Path = os.path.join(PY_Space, 'Source_Data.csv')
KN.PrintTF('\n>> Raw Data Exported to path: '+ Export_Path)
Data.to_csv(Export_Path,index = False)
Я не могу получить таблицу. Пожалуйста, помогите