Cambio imports
This commit is contained in:
34
app.py
34
app.py
@@ -2,6 +2,22 @@ import psycopg2
|
|||||||
|
|
||||||
from psycopg2 import pool
|
from psycopg2 import pool
|
||||||
|
|
||||||
|
from selenium import webdriver
|
||||||
|
from selenium.webdriver.chrome.service import Service
|
||||||
|
from selenium.webdriver.common.by import By
|
||||||
|
from selenium.webdriver.common.keys import Keys
|
||||||
|
from selenium.webdriver.chrome.options import Options
|
||||||
|
from selenium.common.exceptions import NoSuchElementException
|
||||||
|
from selenium.webdriver.support.ui import WebDriverWait
|
||||||
|
from selenium.webdriver.support import expected_conditions as EC
|
||||||
|
from selenium.common.exceptions import StaleElementReferenceException
|
||||||
|
|
||||||
|
import os
|
||||||
|
from flask import Flask, request, jsonify
|
||||||
|
from waitress import serve
|
||||||
|
import pandas as pd
|
||||||
|
from io import StringIO
|
||||||
|
|
||||||
# Crear un pool de conexiones global
|
# Crear un pool de conexiones global
|
||||||
connection_pool = psycopg2.pool.ThreadedConnectionPool(
|
connection_pool = psycopg2.pool.ThreadedConnectionPool(
|
||||||
minconn=1,
|
minconn=1,
|
||||||
@@ -22,24 +38,6 @@ def release_db_connection(conn):
|
|||||||
connection_pool.putconn(conn)
|
connection_pool.putconn(conn)
|
||||||
|
|
||||||
|
|
||||||
from selenium import webdriver
|
|
||||||
from selenium.webdriver.chrome.service import Service
|
|
||||||
from selenium.webdriver.common.by import By
|
|
||||||
from selenium.webdriver.common.keys import Keys
|
|
||||||
from selenium.webdriver.chrome.options import Options
|
|
||||||
from selenium.common.exceptions import NoSuchElementException
|
|
||||||
from selenium.webdriver.support.ui import WebDriverWait
|
|
||||||
from selenium.webdriver.support import expected_conditions as EC
|
|
||||||
from selenium.common.exceptions import StaleElementReferenceException
|
|
||||||
|
|
||||||
import os
|
|
||||||
from flask import Flask, request, jsonify
|
|
||||||
from waitress import serve
|
|
||||||
import pandas as pd
|
|
||||||
from io import StringIO
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Set options for the Chromium browser
|
# Set options for the Chromium browser
|
||||||
chrome_options = Options()
|
chrome_options = Options()
|
||||||
chrome_options.add_argument("--headless") # Optional: Run Chromium in headless mode
|
chrome_options.add_argument("--headless") # Optional: Run Chromium in headless mode
|
||||||
|
|||||||
Reference in New Issue
Block a user