-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscraped_data.html
89 lines (89 loc) · 2.31 KB
/
scraped_data.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Datos Scrapeados</title>
<link rel="stylesheet" href="/static/css/style.css">
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
margin: 0;
padding: 0;
}
h1 {
text-align: center;
margin: 20px 0;
color: #333;
}
table {
width: 90%;
margin: 20px auto;
border-collapse: collapse;
background-color: white;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}
th, td {
padding: 15px;
text-align: left;
border-bottom: 1px solid #ddd;
}
th {
background-color: #2980b9;
color: white;
}
tr:hover {
background-color: #f1f1f1;
}
.container {
display: flex;
justify-content: center;
margin-top: 20px;
}
.button {
padding: 10px 20px;
background-color: #2980b9;
color: white;
text-decoration: none;
border-radius: 5px;
text-align: center;
}
.button:hover {
background-color: #1d5f7e;
}
</style>
</head>
<body>
<h1>Datos Scrapeados</h1>
<div class="container">
<a href="/home" class="button">Volver a la Página Principal</a>
</div>
<table>
<thead>
<tr>
<th>Etiqueta</th>
<th>Contenido</th>
<th>Enlace</th>
<th>Fecha de Scrap</th>
</tr>
</thead>
<tbody>
{% for item in data %}
<tr>
<td>{{ item.tag }}</td>
<td>{{ item.content }}</td>
<td>
{% if item.link %}
<a href="{{ item.link }}" target="_blank">Abrir enlace</a>
{% else %}
Sin enlace
{% endif %}
</td>
<td>{{ item.scraped_at }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</body>
</html>