Compare commits

..

No commits in common. "168a2a99848319663ea50cf5531f18f0a0157334" and "a68d4895cdddca98e51f2c7c9255cfb8c89633ca" have entirely different histories.

21 changed files with 21 additions and 40 deletions

View File

@ -2,10 +2,9 @@
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.venv" />
<excludeFolder url="file://$MODULE_DIR$/venv" />
</content>
<orderEntry type="jdk" jdkName="Python 3.13 (Final)" jdkType="Python SDK" />
<orderEntry type="jdk" jdkName="Python 3.13 (pythonProject)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PyDocumentationSettings">

View File

@ -3,5 +3,5 @@
<component name="Black">
<option name="sdkName" value="Python 3.11.2 WSL (Debian): (/home/santi/.virtualenvs/Final/bin/python)" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.13 (Final)" project-jdk-type="Python SDK" />
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.13 (pythonProject)" project-jdk-type="Python SDK" />
</project>

View File

@ -152,7 +152,7 @@ frame_right.rowconfigure(0, weight=3)
frame_right.rowconfigure(1, weight=1)
frame_right.columnconfigure(0, weight=1)
# Create and place the chat frame and music player tab update
# Create and place the chat frame and music player tab
chat_frame = ChatTab(frame_chat, chat_server_url=config_manager.config["Chat"]["server"],
sender_name=config_manager.config["Chat"]["name"],
stop_event=stop_event, width=200, bg="lightgreen", refresh_rate=1)

View File

@ -33,29 +33,16 @@ class WebScrapingTab(ThreadedTab):
self.data_listbox.pack(pady=10)
def create_database(self):
try:
# Conectar sin especificar la base de datos
conn = mysql.connector.connect(
host="127.0.0.1",
user="santipy",
password="1234"
)
cursor = conn.cursor()
# Crear la base de datos si no existe
cursor.execute("CREATE DATABASE IF NOT EXISTS scraping_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci")
conn.commit()
# Conectar a la base de datos
# Connect to MySQL database
conn = mysql.connector.connect(
host="127.0.0.1 ",
user="santipy",
password="1234",
database="scraping_db"
)
cursor = conn.cursor()
# Crear la tabla si no existe
cursor = conn.cursor()
cursor.execute("""
CREATE TABLE IF NOT EXISTS scraped_data (
id INT AUTO_INCREMENT PRIMARY KEY,
@ -64,12 +51,7 @@ class WebScrapingTab(ThreadedTab):
)
""")
conn.commit()
return conn
except mysql.connector.Error as err:
print(f"Error al conectar o crear la base de datos: {err}")
messagebox.showerror("Database Error", f"Error al conectar o crear la base de datos: {err}")
return None
def save_to_database(self):