Spaces:
Running
Running
Upload index.html
Browse files- templates/index.html +38 -0
templates/index.html
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8" />
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 6 |
+
<title>🌐 Web Content Extractor</title>
|
| 7 |
+
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
| 8 |
+
</head>
|
| 9 |
+
<body>
|
| 10 |
+
<div class="container">
|
| 11 |
+
<h1>🌐 Web Content Extractor</h1>
|
| 12 |
+
|
| 13 |
+
<div class="form-section">
|
| 14 |
+
<input type="text" id="url" placeholder="Enter website URL (e.g. https://example.com)">
|
| 15 |
+
<input type="text" id="tag" placeholder="Enter HTML tag (e.g. h1, p, a, all)">
|
| 16 |
+
<button onclick="extractContent()">Extract</button>
|
| 17 |
+
</div>
|
| 18 |
+
|
| 19 |
+
<div id="result-box">
|
| 20 |
+
<h2>Results:</h2>
|
| 21 |
+
<div id="output"></div>
|
| 22 |
+
|
| 23 |
+
<div id="analysis-box" class="hidden">
|
| 24 |
+
<h3>🧠 Text Analysis</h3>
|
| 25 |
+
<p><b>Language:</b> <span id="lang"></span></p>
|
| 26 |
+
<p><b>Total Words:</b> <span id="wordCount"></span></p>
|
| 27 |
+
<p><b>Sentences:</b> <span id="sentCount"></span></p>
|
| 28 |
+
<p><b>Unique Words:</b> <span id="uniqueCount"></span></p>
|
| 29 |
+
|
| 30 |
+
<h4>Top Words:</h4>
|
| 31 |
+
<ul id="topWords"></ul>
|
| 32 |
+
</div>
|
| 33 |
+
</div>
|
| 34 |
+
</div>
|
| 35 |
+
|
| 36 |
+
<script src="/static/script.js"></script>
|
| 37 |
+
</body>
|
| 38 |
+
</html>
|