UniversalScrap / index.html
Lukeetah's picture
Create index.html
5146535 verified
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sistema de Scraping - Ley de Lobby Chile</title>
<style>
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background-color: #f4f4f9; color: #333; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; }
.container { text-align: center; background: #fff; padding: 40px; border-radius: 10px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
h1 { color: #0056b3; }
p { color: #666; max-width: 500px; margin: 20px auto; }
.scrape-button { background-color: #007bff; color: white; padding: 15px 30px; border: none; border-radius: 5px; font-size: 16px; cursor: pointer; transition: background-color 0.3s; }
.scrape-button:hover { background-color: #0056b3; }
.messages { list-style: none; padding: 0; margin-top: 20px; }
.messages li { padding: 15px; border-radius: 5px; margin-bottom: 10px; }
.messages .success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.messages .error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
</style>
</head>
<body>
<div class="container">
<h1>Sistema de Scraping de Audiencias</h1>
<p>Haz clic en el bot贸n para extraer los datos de audiencias del a帽o 2025 desde el portal de Ley de Lobby y guardarlos en archivos <strong>.txt</strong> y <strong>.csv</strong>.</p>
<!-- Formulario que env铆a una solicitud POST a la ruta /scrape -->
<form action="/scrape" method="post">
<button type="submit" class="scrape-button">Iniciar Extracci贸n de Datos</button>
</form>
<!-- Secci贸n para mostrar los mensajes de 茅xito o error enviados desde Flask -->
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
<ul class="messages">
{% for category, message in messages %}
<li class="{{ category }}">{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% endwith %}
</div>
</body>
</html>