diff --git a/app.py b/app.py
index 00692f6..94956d7 100644
--- a/app.py
+++ b/app.py
@@ -155,19 +155,25 @@ def extract(driver, username: str, password: str):
# Obtener el HTML de las materias
materias_html = driver.find_element(By.ID, 'ctl00_contenedor_HistorialAlumno1_divHAcademico').get_attribute('innerHTML')
historial_html = driver.find_element(By.ID, 'ctl00_contenedor_HistorialAlumno1_gvMaterias').get_attribute('innerHTML')
+ materias_actuales_html = driver.find_element(By.ID, 'ctl00_contenedor_HistorialAlumno1_gvMatOrdinario').get_attribute('innerHTML')
# Manejar el historial como DataFrame
historial_html_io = StringIO(f"
")
+ materias_html_io = StringIO(f"")
df = pd.read_html(historial_html_io)[0]
+ df_materias = pd.read_html(materias_html_io)[0]
json_result = None
+ json_materias = None
if 'GRUPO' in df.columns:
df['PERIODO'] = df['PERIODO'].apply(lambda x: str(x).replace('.0', '') if isinstance(x, (float, int)) else x)
json_result = df[df['GRUPO'] != 'Promedio:'].to_json(orient='records')
+
+ json_materias = df_materias.to_json(orient='records')
- query = insert_alumno_extraccion(datos_html, materias_html, username_integer, json_result)
+ query = insert_alumno_extraccion(datos_html, materias_html, username_integer, json_result, json_materias)
print("Data extracted successfully")
return json_result