Add 3 files
Browse files- README.md +7 -5
- index.html +1174 -19
- prompts.txt +0 -0
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: area-code-focused-data-extraction-tool
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: purple
|
| 5 |
+
colorTo: red
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,1174 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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>Legal WebScraper Pro | Area Code Focused Data Extraction</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
+
<style>
|
| 10 |
+
@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600&family=Libre+Baskerville:wght@400;700&display=swap');
|
| 11 |
+
|
| 12 |
+
body {
|
| 13 |
+
font-family: 'Libre Baskerville', serif;
|
| 14 |
+
background-color: #f8fafc;
|
| 15 |
+
color: #1e293b;
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
.code-font {
|
| 19 |
+
font-family: 'Source Code Pro', monospace;
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
.header-gradient {
|
| 23 |
+
background: linear-gradient(135deg, #1e40af 0%, #7c3aed 100%);
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
.progress-bar {
|
| 27 |
+
height: 6px;
|
| 28 |
+
background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
|
| 29 |
+
transition: width 0.3s ease;
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
.data-card {
|
| 33 |
+
transition: all 0.3s ease;
|
| 34 |
+
border-left: 4px solid transparent;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
.data-card:hover {
|
| 38 |
+
transform: translateY(-2px);
|
| 39 |
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
|
| 40 |
+
border-left-color: #4f46e5;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
.file-upload {
|
| 44 |
+
border: 2px dashed #cbd5e1;
|
| 45 |
+
transition: all 0.3s ease;
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
.file-upload:hover {
|
| 49 |
+
border-color: #818cf8;
|
| 50 |
+
background-color: #f1f5f9;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
.file-upload.dragover {
|
| 54 |
+
border-color: #4f46e5;
|
| 55 |
+
background-color: #e0e7ff;
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
.spinner {
|
| 59 |
+
animation: spin 1s linear infinite;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
@keyframes spin {
|
| 63 |
+
0% { transform: rotate(0deg); }
|
| 64 |
+
100% { transform: rotate(360deg); }
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
.tab-active {
|
| 68 |
+
border-bottom: 3px solid #4f46e5;
|
| 69 |
+
color: #4f46e5;
|
| 70 |
+
font-weight: 600;
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
.tooltip {
|
| 74 |
+
position: relative;
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
.tooltip-text {
|
| 78 |
+
visibility: hidden;
|
| 79 |
+
width: 200px;
|
| 80 |
+
background-color: #1e293b;
|
| 81 |
+
color: #fff;
|
| 82 |
+
text-align: center;
|
| 83 |
+
border-radius: 6px;
|
| 84 |
+
padding: 5px;
|
| 85 |
+
position: absolute;
|
| 86 |
+
z-index: 1;
|
| 87 |
+
bottom: 125%;
|
| 88 |
+
left: 50%;
|
| 89 |
+
margin-left: -100px;
|
| 90 |
+
opacity: 0;
|
| 91 |
+
transition: opacity 0.3s;
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
.tooltip:hover .tooltip-text {
|
| 95 |
+
visibility: visible;
|
| 96 |
+
opacity: 1;
|
| 97 |
+
}
|
| 98 |
+
</style>
|
| 99 |
+
</head>
|
| 100 |
+
<body class="min-h-screen">
|
| 101 |
+
<!-- Header -->
|
| 102 |
+
<header class="header-gradient text-white shadow-lg">
|
| 103 |
+
<div class="container mx-auto px-4 py-6">
|
| 104 |
+
<div class="flex justify-between items-center">
|
| 105 |
+
<div>
|
| 106 |
+
<h1 class="text-3xl font-bold">Legal WebScraper Pro</h1>
|
| 107 |
+
<p class="mt-2 opacity-90">Area Code Focused Data Extraction Tool</p>
|
| 108 |
+
</div>
|
| 109 |
+
<div class="flex items-center space-x-4">
|
| 110 |
+
<div class="tooltip">
|
| 111 |
+
<button class="p-2 rounded-full bg-indigo-700 hover:bg-indigo-600 transition">
|
| 112 |
+
<i class="fas fa-question"></i>
|
| 113 |
+
</button>
|
| 114 |
+
<span class="tooltip-text">This tool complies with ethical scraping guidelines and respects robots.txt</span>
|
| 115 |
+
</div>
|
| 116 |
+
<button id="exportBtn" class="hidden px-4 py-2 bg-white text-indigo-700 rounded-lg font-medium hover:bg-gray-100 transition">
|
| 117 |
+
<i class="fas fa-file-export mr-2"></i>Export Data
|
| 118 |
+
</button>
|
| 119 |
+
</div>
|
| 120 |
+
</div>
|
| 121 |
+
</div>
|
| 122 |
+
</header>
|
| 123 |
+
|
| 124 |
+
<!-- Main Content -->
|
| 125 |
+
<main class="container mx-auto px-4 py-8">
|
| 126 |
+
<!-- Configuration Panel -->
|
| 127 |
+
<div class="bg-white rounded-xl shadow-md overflow-hidden mb-8">
|
| 128 |
+
<div class="p-6">
|
| 129 |
+
<h2 class="text-2xl font-bold text-gray-800 mb-6">Scraper Configuration</h2>
|
| 130 |
+
|
| 131 |
+
<!-- Tabs -->
|
| 132 |
+
<div class="border-b border-gray-200 mb-6">
|
| 133 |
+
<div class="flex space-x-8">
|
| 134 |
+
<button id="manualTab" class="tab-active pb-3 px-1 text-sm font-medium">Manual Input</button>
|
| 135 |
+
<button id="fileTab" class="pb-3 px-1 text-sm font-medium text-gray-500 hover:text-gray-700">File Upload</button>
|
| 136 |
+
<button id="aggregatorTab" class="pb-3 px-1 text-sm font-medium text-gray-500 hover:text-gray-700">URL Aggregator</button>
|
| 137 |
+
</div>
|
| 138 |
+
</div>
|
| 139 |
+
|
| 140 |
+
<!-- Area Code Input -->
|
| 141 |
+
<div class="mb-6">
|
| 142 |
+
<label for="areaCode" class="block text-sm font-medium text-gray-700 mb-2">Target Area Code</label>
|
| 143 |
+
<div class="mt-1 relative rounded-md shadow-sm max-w-xs">
|
| 144 |
+
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
|
| 145 |
+
<span class="text-gray-500 sm:text-sm">#</span>
|
| 146 |
+
</div>
|
| 147 |
+
<input type="text" name="areaCode" id="areaCode"
|
| 148 |
+
class="focus:ring-indigo-500 focus:border-indigo-500 block w-full pl-7 pr-12 py-2 sm:text-sm border-gray-300 rounded-md"
|
| 149 |
+
placeholder="e.g. 90210" maxlength="5">
|
| 150 |
+
<div class="absolute inset-y-0 right-0 flex items-center">
|
| 151 |
+
<label for="countryCode" class="sr-only">Country</label>
|
| 152 |
+
<select id="countryCode" class="focus:ring-indigo-500 focus:border-indigo-500 h-full py-0 pl-2 pr-7 border-transparent bg-transparent text-gray-500 sm:text-sm rounded-md">
|
| 153 |
+
<option>US +1</option>
|
| 154 |
+
<option>UK +44</option>
|
| 155 |
+
<option>CA +1</option>
|
| 156 |
+
<option>AU +61</option>
|
| 157 |
+
</select>
|
| 158 |
+
</div>
|
| 159 |
+
</div>
|
| 160 |
+
<p id="areaCodeError" class="mt-1 text-sm text-red-600 hidden">Please enter a valid area code (3-5 digits)</p>
|
| 161 |
+
</div>
|
| 162 |
+
|
| 163 |
+
<!-- Manual Input Tab Content -->
|
| 164 |
+
<div id="manualContent" class="space-y-6">
|
| 165 |
+
<div>
|
| 166 |
+
<label for="urlInput" class="block text-sm font-medium text-gray-700 mb-2">Website URLs (one per line)</label>
|
| 167 |
+
<textarea id="urlInput" rows="5" class="shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm border border-gray-300 rounded-md"></textarea>
|
| 168 |
+
<div class="mt-2 flex justify-end">
|
| 169 |
+
<button id="addSampleBtn" class="inline-flex items-center px-3 py-1 border border-gray-300 shadow-sm text-sm leading-4 font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none">
|
| 170 |
+
<i class="fas fa-vial mr-1"></i> Add Sample URLs
|
| 171 |
+
</button>
|
| 172 |
+
</div>
|
| 173 |
+
</div>
|
| 174 |
+
</div>
|
| 175 |
+
|
| 176 |
+
<!-- File Upload Tab Content -->
|
| 177 |
+
<div id="fileContent" class="hidden space-y-6">
|
| 178 |
+
<div class="file-upload rounded-lg p-8 text-center cursor-pointer" id="dropZone">
|
| 179 |
+
<input type="file" id="fileInput" class="hidden" accept=".txt,.csv">
|
| 180 |
+
<div class="flex flex-col items-center justify-center">
|
| 181 |
+
<i class="fas fa-cloud-upload-alt text-4xl text-gray-400 mb-3"></i>
|
| 182 |
+
<p class="text-sm text-gray-600 mb-1">Drag & drop your URLs file here</p>
|
| 183 |
+
<p class="text-xs text-gray-500">or</p>
|
| 184 |
+
<label for="fileInput" class="mt-2 px-4 py-2 bg-indigo-600 text-white text-sm font-medium rounded-md hover:bg-indigo-700 cursor-pointer">
|
| 185 |
+
Browse Files
|
| 186 |
+
</label>
|
| 187 |
+
</div>
|
| 188 |
+
<div id="fileInfo" class="mt-4 hidden">
|
| 189 |
+
<p class="text-sm font-medium text-gray-700"><i class="fas fa-file-alt mr-2"></i><span id="fileName"></span></p>
|
| 190 |
+
<p class="text-xs text-gray-500 mt-1"><span id="fileSize"></span> | <span id="fileType"></span></p>
|
| 191 |
+
</div>
|
| 192 |
+
</div>
|
| 193 |
+
</div>
|
| 194 |
+
|
| 195 |
+
<!-- URL Aggregator Tab Content -->
|
| 196 |
+
<div id="aggregatorContent" class="hidden space-y-6">
|
| 197 |
+
<div>
|
| 198 |
+
<label for="searchTopic" class="block text-sm font-medium text-gray-700 mb-2">Search Topic/Keywords</label>
|
| 199 |
+
<input type="text" id="searchTopic" class="shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm border border-gray-300 rounded-md" placeholder="e.g. public records, business listings">
|
| 200 |
+
</div>
|
| 201 |
+
<div>
|
| 202 |
+
<label for="resultLimit" class="block text-sm font-medium text-gray-700 mb-2">Maximum Results</label>
|
| 203 |
+
<select id="resultLimit" class="shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm border border-gray-300 rounded-md">
|
| 204 |
+
<option value="10">10</option>
|
| 205 |
+
<option value="20" selected>20</option>
|
| 206 |
+
<option value="30">30</option>
|
| 207 |
+
<option value="50">50</option>
|
| 208 |
+
</select>
|
| 209 |
+
</div>
|
| 210 |
+
<div class="flex items-center">
|
| 211 |
+
<input id="includeGovCheck" type="checkbox" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded" checked>
|
| 212 |
+
<label for="includeGovCheck" class="ml-2 block text-sm text-gray-700">Include government sources (.gov)</label>
|
| 213 |
+
</div>
|
| 214 |
+
<div class="flex items-center">
|
| 215 |
+
<input id="includeEduCheck" type="checkbox" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded" checked>
|
| 216 |
+
<label for="includeEduCheck" class="ml-2 block text-sm text-gray-700">Include educational sources (.edu)</label>
|
| 217 |
+
</div>
|
| 218 |
+
</div>
|
| 219 |
+
|
| 220 |
+
<!-- National Databases Section -->
|
| 221 |
+
<div class="mt-8 pt-6 border-t border-gray-200">
|
| 222 |
+
<div class="flex items-center justify-between mb-4">
|
| 223 |
+
<h3 class="text-lg font-medium text-gray-900">National Databases</h3>
|
| 224 |
+
<button id="toggleDbBtn" class="text-sm text-indigo-600 hover:text-indigo-500">Select All</button>
|
| 225 |
+
</div>
|
| 226 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
| 227 |
+
<div class="flex items-center">
|
| 228 |
+
<input id="censusCheck" type="checkbox" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded" checked>
|
| 229 |
+
<label for="censusCheck" class="ml-2 block text-sm text-gray-700">US Census Bureau</label>
|
| 230 |
+
</div>
|
| 231 |
+
<div class="flex items-center">
|
| 232 |
+
<input id="fccCheck" type="checkbox" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded" checked>
|
| 233 |
+
<label for="fccCheck" class="ml-2 block text-sm text-gray-700">FCC Area Code Data</label>
|
| 234 |
+
</div>
|
| 235 |
+
<div class="flex items-center">
|
| 236 |
+
<input id="uspsCheck" type="checkbox" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded" checked>
|
| 237 |
+
<label for="uspsCheck" class="ml-2 block text-sm text-gray-700">USPS Zip Code Data</label>
|
| 238 |
+
</div>
|
| 239 |
+
<div class="flex items-center">
|
| 240 |
+
<input id="dunsCheck" type="checkbox" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded">
|
| 241 |
+
<label for="dunsCheck" class="ml-2 block text-sm text-gray-700">DUNS Business Registry</label>
|
| 242 |
+
</div>
|
| 243 |
+
</div>
|
| 244 |
+
</div>
|
| 245 |
+
|
| 246 |
+
<!-- Advanced Options -->
|
| 247 |
+
<div class="mt-8 pt-6 border-t border-gray-200">
|
| 248 |
+
<div class="flex items-center justify-between mb-4">
|
| 249 |
+
<h3 class="text-lg font-medium text-gray-900">Advanced Options</h3>
|
| 250 |
+
<button id="toggleAdvancedBtn" class="text-sm text-indigo-600 hover:text-indigo-500">Show</button>
|
| 251 |
+
</div>
|
| 252 |
+
<div id="advancedOptions" class="hidden space-y-4">
|
| 253 |
+
<div>
|
| 254 |
+
<label for="requestDelay" class="block text-sm font-medium text-gray-700 mb-1">Request Delay (seconds)</label>
|
| 255 |
+
<input type="range" id="requestDelay" min="1" max="10" value="3" class="w-full">
|
| 256 |
+
<div class="flex justify-between text-xs text-gray-500 mt-1">
|
| 257 |
+
<span>1s (Fast)</span>
|
| 258 |
+
<span id="delayValue">3s</span>
|
| 259 |
+
<span>10s (Slow)</span>
|
| 260 |
+
</div>
|
| 261 |
+
</div>
|
| 262 |
+
<div class="flex items-center">
|
| 263 |
+
<input id="respectRobots" type="checkbox" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded" checked>
|
| 264 |
+
<label for="respectRobots" class="ml-2 block text-sm text-gray-700">Respect robots.txt</label>
|
| 265 |
+
</div>
|
| 266 |
+
<div class="flex items-center">
|
| 267 |
+
<input id="jsRendering" type="checkbox" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded">
|
| 268 |
+
<label for="jsRendering" class="ml-2 block text-sm text-gray-700">Enable JavaScript rendering (slower)</label>
|
| 269 |
+
</div>
|
| 270 |
+
<div>
|
| 271 |
+
<label for="userAgent" class="block text-sm font-medium text-gray-700 mb-1">Custom User Agent</label>
|
| 272 |
+
<select id="userAgent" class="shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm border border-gray-300 rounded-md">
|
| 273 |
+
<option value="default">Default (Mozilla/5.0)</option>
|
| 274 |
+
<option value="googlebot">Googlebot</option>
|
| 275 |
+
<option value="bingbot">Bingbot</option>
|
| 276 |
+
<option value="custom">Custom...</option>
|
| 277 |
+
</select>
|
| 278 |
+
<input id="customUserAgent" type="text" class="mt-2 shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm border border-gray-300 rounded-md hidden" placeholder="Enter custom user agent">
|
| 279 |
+
</div>
|
| 280 |
+
</div>
|
| 281 |
+
</div>
|
| 282 |
+
|
| 283 |
+
<!-- Action Buttons -->
|
| 284 |
+
<div class="mt-8 flex flex-col sm:flex-row sm:justify-between space-y-4 sm:space-y-0 sm:space-x-4">
|
| 285 |
+
<button id="clearBtn" class="px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none">
|
| 286 |
+
<i class="fas fa-eraser mr-2"></i>Clear Form
|
| 287 |
+
</button>
|
| 288 |
+
<button id="startBtn" class="px-4 py-2 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none">
|
| 289 |
+
<i class="fas fa-play mr-2"></i>Start Scraping
|
| 290 |
+
</button>
|
| 291 |
+
</div>
|
| 292 |
+
</div>
|
| 293 |
+
</div>
|
| 294 |
+
|
| 295 |
+
<!-- Progress Section -->
|
| 296 |
+
<div id="progressSection" class="bg-white rounded-xl shadow-md overflow-hidden mb-8 hidden">
|
| 297 |
+
<div class="p-6">
|
| 298 |
+
<h2 class="text-2xl font-bold text-gray-800 mb-4">Scraping Progress</h2>
|
| 299 |
+
<div class="mb-4">
|
| 300 |
+
<div class="flex justify-between text-sm text-gray-600 mb-1">
|
| 301 |
+
<span>Status: <span id="statusText" class="font-medium">Initializing</span></span>
|
| 302 |
+
<span id="progressText">0%</span>
|
| 303 |
+
</div>
|
| 304 |
+
<div class="w-full bg-gray-200 rounded-full h-2.5">
|
| 305 |
+
<div id="progressBar" class="progress-bar h-2.5 rounded-full" style="width: 0%"></div>
|
| 306 |
+
</div>
|
| 307 |
+
</div>
|
| 308 |
+
<div class="grid grid-cols-2 md:grid-cols-4 gap-4 mb-4">
|
| 309 |
+
<div class="bg-gray-50 p-3 rounded-lg">
|
| 310 |
+
<p class="text-xs text-gray-500">URLs Processed</p>
|
| 311 |
+
<p class="text-lg font-semibold"><span id="processedCount">0</span>/<span id="totalCount">0</span></p>
|
| 312 |
+
</div>
|
| 313 |
+
<div class="bg-gray-50 p-3 rounded-lg">
|
| 314 |
+
<p class="text-xs text-gray-500">Data Points</p>
|
| 315 |
+
<p class="text-lg font-semibold" id="dataPoints">0</p>
|
| 316 |
+
</div>
|
| 317 |
+
<div class="bg-gray-50 p-3 rounded-lg">
|
| 318 |
+
<p class="text-xs text-gray-500">Errors</p>
|
| 319 |
+
<p class="text-lg font-semibold text-red-600" id="errorCount">0</p>
|
| 320 |
+
</div>
|
| 321 |
+
<div class="bg-gray-50 p-3 rounded-lg">
|
| 322 |
+
<p class="text-xs text-gray-500">Time Elapsed</p>
|
| 323 |
+
<p class="text-lg font-semibold" id="timeElapsed">00:00</p>
|
| 324 |
+
</div>
|
| 325 |
+
</div>
|
| 326 |
+
<div class="border-t border-gray-200 pt-4">
|
| 327 |
+
<h3 class="text-sm font-medium text-gray-700 mb-2">Activity Log</h3>
|
| 328 |
+
<div id="activityLog" class="bg-gray-50 p-3 rounded-lg max-h-40 overflow-y-auto text-sm code-font">
|
| 329 |
+
<div class="text-gray-500">System initialized and ready...</div>
|
| 330 |
+
</div>
|
| 331 |
+
</div>
|
| 332 |
+
<div class="mt-4 flex justify-end">
|
| 333 |
+
<button id="stopBtn" class="px-4 py-2 border border-transparent text-sm font-medium rounded-md text-white bg-red-600 hover:bg-red-700 focus:outline-none">
|
| 334 |
+
<i class="fas fa-stop mr-2"></i>Stop Scraping
|
| 335 |
+
</button>
|
| 336 |
+
</div>
|
| 337 |
+
</div>
|
| 338 |
+
</div>
|
| 339 |
+
|
| 340 |
+
<!-- Results Section -->
|
| 341 |
+
<div id="resultsSection" class="hidden">
|
| 342 |
+
<div class="flex justify-between items-center mb-6">
|
| 343 |
+
<h2 class="text-2xl font-bold text-gray-800">Scraping Results</h2>
|
| 344 |
+
<div class="flex space-x-3">
|
| 345 |
+
<button id="exportCsvBtn" class="px-3 py-1 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">
|
| 346 |
+
<i class="fas fa-file-csv mr-1"></i>CSV
|
| 347 |
+
</button>
|
| 348 |
+
<button id="exportJsonBtn" class="px-3 py-1 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">
|
| 349 |
+
<i class="fas fa-file-code mr-1"></i>JSON
|
| 350 |
+
</button>
|
| 351 |
+
<button id="exportPdfBtn" class="px-3 py-1 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">
|
| 352 |
+
<i class="fas fa-file-pdf mr-1"></i>PDF
|
| 353 |
+
</button>
|
| 354 |
+
</div>
|
| 355 |
+
</div>
|
| 356 |
+
|
| 357 |
+
<!-- Summary Cards -->
|
| 358 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
|
| 359 |
+
<div class="data-card bg-white p-6 rounded-lg shadow-sm">
|
| 360 |
+
<div class="flex items-center mb-3">
|
| 361 |
+
<div class="p-2 rounded-full bg-blue-100 text-blue-600 mr-3">
|
| 362 |
+
<i class="fas fa-link"></i>
|
| 363 |
+
</div>
|
| 364 |
+
<h3 class="text-lg font-medium">Sources Processed</h3>
|
| 365 |
+
</div>
|
| 366 |
+
<p class="text-3xl font-bold mb-2" id="sourcesProcessed">0</p>
|
| 367 |
+
<p class="text-sm text-gray-500"><span id="successRate">100</span>% success rate</p>
|
| 368 |
+
</div>
|
| 369 |
+
<div class="data-card bg-white p-6 rounded-lg shadow-sm">
|
| 370 |
+
<div class="flex items-center mb-3">
|
| 371 |
+
<div class="p-2 rounded-full bg-green-100 text-green-600 mr-3">
|
| 372 |
+
<i class="fas fa-database"></i>
|
| 373 |
+
</div>
|
| 374 |
+
<h3 class="text-lg font-medium">Data Extracted</h3>
|
| 375 |
+
</div>
|
| 376 |
+
<p class="text-3xl font-bold mb-2" id="totalDataPoints">0</p>
|
| 377 |
+
<p class="text-sm text-gray-500"><span id="uniqueData">0</span> unique records</p>
|
| 378 |
+
</div>
|
| 379 |
+
<div class="data-card bg-white p-6 rounded-lg shadow-sm">
|
| 380 |
+
<div class="flex items-center mb-3">
|
| 381 |
+
<div class="p-2 rounded-full bg-purple-100 text-purple-600 mr-3">
|
| 382 |
+
<i class="fas fa-map-marker-alt"></i>
|
| 383 |
+
</div>
|
| 384 |
+
<h3 class="text-lg font-medium">Area Code Matches</h3>
|
| 385 |
+
</div>
|
| 386 |
+
<p class="text-3xl font-bold mb-2" id="areaCodeMatches">0</p>
|
| 387 |
+
<p class="text-sm text-gray-500"><span id="relatedMatches">0</span> related matches</p>
|
| 388 |
+
</div>
|
| 389 |
+
</div>
|
| 390 |
+
|
| 391 |
+
<!-- Data Tabs -->
|
| 392 |
+
<div class="bg-white rounded-xl shadow-md overflow-hidden mb-8">
|
| 393 |
+
<div class="border-b border-gray-200">
|
| 394 |
+
<nav class="-mb-px flex">
|
| 395 |
+
<button data-tab="contacts" class="tab-active whitespace-nowrap py-4 px-4 border-b-2 font-medium text-sm">Contacts</button>
|
| 396 |
+
<button data-tab="addresses" class="whitespace-nowrap py-4 px-4 border-b-2 font-medium text-sm border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300">Addresses</button>
|
| 397 |
+
<button data-tab="phones" class="whitespace-nowrap py-4 px-4 border-b-2 font-medium text-sm border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300">Phone Numbers</button>
|
| 398 |
+
<button data-tab="links" class="whitespace-nowrap py-4 px-4 border-b-2 font-medium text-sm border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300">Links</button>
|
| 399 |
+
<button data-tab="media" class="whitespace-nowrap py-4 px-4 border-b-2 font-medium text-sm border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300">Media</button>
|
| 400 |
+
<button data-tab="errors" class="whitespace-nowrap py-4 px-4 border-b-2 font-medium text-sm border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300">Errors</button>
|
| 401 |
+
</nav>
|
| 402 |
+
</div>
|
| 403 |
+
|
| 404 |
+
<!-- Contacts Tab -->
|
| 405 |
+
<div id="contactsTab" class="p-6">
|
| 406 |
+
<div class="flex justify-between items-center mb-4">
|
| 407 |
+
<h3 class="text-lg font-medium">Extracted Contacts</h3>
|
| 408 |
+
<div class="relative">
|
| 409 |
+
<input type="text" placeholder="Filter contacts..." class="pl-8 pr-4 py-2 border border-gray-300 rounded-md text-sm focus:ring-indigo-500 focus:border-indigo-500" id="contactFilter">
|
| 410 |
+
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
|
| 411 |
+
<i class="fas fa-search text-gray-400"></i>
|
| 412 |
+
</div>
|
| 413 |
+
</div>
|
| 414 |
+
</div>
|
| 415 |
+
<div class="overflow-x-auto">
|
| 416 |
+
<table class="min-w-full divide-y divide-gray-200">
|
| 417 |
+
<thead class="bg-gray-50">
|
| 418 |
+
<tr>
|
| 419 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Name</th>
|
| 420 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Title</th>
|
| 421 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Email</th>
|
| 422 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Phone</th>
|
| 423 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Source</th>
|
| 424 |
+
</tr>
|
| 425 |
+
</thead>
|
| 426 |
+
<tbody id="contactsTable" class="bg-white divide-y divide-gray-200">
|
| 427 |
+
<!-- Contacts will be inserted here -->
|
| 428 |
+
</tbody>
|
| 429 |
+
</table>
|
| 430 |
+
</div>
|
| 431 |
+
<div id="contactsEmpty" class="text-center py-12">
|
| 432 |
+
<i class="fas fa-user-slash text-4xl text-gray-300 mb-3"></i>
|
| 433 |
+
<p class="text-gray-500">No contacts found matching your criteria</p>
|
| 434 |
+
</div>
|
| 435 |
+
</div>
|
| 436 |
+
|
| 437 |
+
<!-- Addresses Tab -->
|
| 438 |
+
<div id="addressesTab" class="p-6 hidden">
|
| 439 |
+
<div class="flex justify-between items-center mb-4">
|
| 440 |
+
<h3 class="text-lg font-medium">Extracted Addresses</h3>
|
| 441 |
+
<div class="flex space-x-2">
|
| 442 |
+
<button id="mapViewBtn" class="px-3 py-1 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">
|
| 443 |
+
<i class="fas fa-map mr-1"></i>Map View
|
| 444 |
+
</button>
|
| 445 |
+
<div class="relative">
|
| 446 |
+
<input type="text" placeholder="Filter addresses..." class="pl-8 pr-4 py-2 border border-gray-300 rounded-md text-sm focus:ring-indigo-500 focus:border-indigo-500" id="addressFilter">
|
| 447 |
+
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
|
| 448 |
+
<i class="fas fa-search text-gray-400"></i>
|
| 449 |
+
</div>
|
| 450 |
+
</div>
|
| 451 |
+
</div>
|
| 452 |
+
</div>
|
| 453 |
+
<div class="overflow-x-auto">
|
| 454 |
+
<table class="min-w-full divide-y divide-gray-200">
|
| 455 |
+
<thead class="bg-gray-50">
|
| 456 |
+
<tr>
|
| 457 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Address</th>
|
| 458 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Type</th>
|
| 459 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Coordinates</th>
|
| 460 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Source</th>
|
| 461 |
+
</tr>
|
| 462 |
+
</thead>
|
| 463 |
+
<tbody id="addressesTable" class="bg-white divide-y divide-gray-200">
|
| 464 |
+
<!-- Addresses will be inserted here -->
|
| 465 |
+
</tbody>
|
| 466 |
+
</table>
|
| 467 |
+
</div>
|
| 468 |
+
<div id="addressesEmpty" class="text-center py-12 hidden">
|
| 469 |
+
<i class="fas fa-map-marker-alt text-4xl text-gray-300 mb-3"></i>
|
| 470 |
+
<p class="text-gray-500">No addresses found matching your criteria</p>
|
| 471 |
+
</div>
|
| 472 |
+
</div>
|
| 473 |
+
|
| 474 |
+
<!-- Phone Numbers Tab -->
|
| 475 |
+
<div id="phonesTab" class="p-6 hidden">
|
| 476 |
+
<div class="flex justify-between items-center mb-4">
|
| 477 |
+
<h3 class="text-lg font-medium">Extracted Phone Numbers</h3>
|
| 478 |
+
<div class="relative">
|
| 479 |
+
<input type="text" placeholder="Filter numbers..." class="pl-8 pr-4 py-2 border border-gray-300 rounded-md text-sm focus:ring-indigo-500 focus:border-indigo-500" id="phoneFilter">
|
| 480 |
+
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
|
| 481 |
+
<i class="fas fa-search text-gray-400"></i>
|
| 482 |
+
</div>
|
| 483 |
+
</div>
|
| 484 |
+
</div>
|
| 485 |
+
<div class="overflow-x-auto">
|
| 486 |
+
<table class="min-w-full divide-y divide-gray-200">
|
| 487 |
+
<thead class="bg-gray-50">
|
| 488 |
+
<tr>
|
| 489 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Number</th>
|
| 490 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Type</th>
|
| 491 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Context</th>
|
| 492 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Source</th>
|
| 493 |
+
</tr>
|
| 494 |
+
</thead>
|
| 495 |
+
<tbody id="phonesTable" class="bg-white divide-y divide-gray-200">
|
| 496 |
+
<!-- Phone numbers will be inserted here -->
|
| 497 |
+
</tbody>
|
| 498 |
+
</table>
|
| 499 |
+
</div>
|
| 500 |
+
<div id="phonesEmpty" class="text-center py-12 hidden">
|
| 501 |
+
<i class="fas fa-phone-slash text-4xl text-gray-300 mb-3"></i>
|
| 502 |
+
<p class="text-gray-500">No phone numbers found matching your criteria</p>
|
| 503 |
+
</div>
|
| 504 |
+
</div>
|
| 505 |
+
|
| 506 |
+
<!-- Links Tab -->
|
| 507 |
+
<div id="linksTab" class="p-6 hidden">
|
| 508 |
+
<div class="flex justify-between items-center mb-4">
|
| 509 |
+
<h3 class="text-lg font-medium">Extracted Links</h3>
|
| 510 |
+
<div class="relative">
|
| 511 |
+
<input type="text" placeholder="Filter links..." class="pl-8 pr-4 py-2 border border-gray-300 rounded-md text-sm focus:ring-indigo-500 focus:border-indigo-500" id="linkFilter">
|
| 512 |
+
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
|
| 513 |
+
<i class="fas fa-search text-gray-400"></i>
|
| 514 |
+
</div>
|
| 515 |
+
</div>
|
| 516 |
+
</div>
|
| 517 |
+
<div class="overflow-x-auto">
|
| 518 |
+
<table class="min-w-full divide-y divide-gray-200">
|
| 519 |
+
<thead class="bg-gray-50">
|
| 520 |
+
<tr>
|
| 521 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">URL</th>
|
| 522 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Anchor Text</th>
|
| 523 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Domain</th>
|
| 524 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Source</th>
|
| 525 |
+
</tr>
|
| 526 |
+
</thead>
|
| 527 |
+
<tbody id="linksTable" class="bg-white divide-y divide-gray-200">
|
| 528 |
+
<!-- Links will be inserted here -->
|
| 529 |
+
</tbody>
|
| 530 |
+
</table>
|
| 531 |
+
</div>
|
| 532 |
+
<div id="linksEmpty" class="text-center py-12 hidden">
|
| 533 |
+
<i class="fas fa-unlink text-4xl text-gray-300 mb-3"></i>
|
| 534 |
+
<p class="text-gray-500">No links found matching your criteria</p>
|
| 535 |
+
</div>
|
| 536 |
+
</div>
|
| 537 |
+
|
| 538 |
+
<!-- Media Tab -->
|
| 539 |
+
<div id="mediaTab" class="p-6 hidden">
|
| 540 |
+
<div class="flex justify-between items-center mb-4">
|
| 541 |
+
<h3 class="text-lg font-medium">Extracted Media</h3>
|
| 542 |
+
<div class="relative">
|
| 543 |
+
<input type="text" placeholder="Filter media..." class="pl-8 pr-4 py-2 border border-gray-300 rounded-md text-sm focus:ring-indigo-500 focus:border-indigo-500" id="mediaFilter">
|
| 544 |
+
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
|
| 545 |
+
<i class="fas fa-search text-gray-400"></i>
|
| 546 |
+
</div>
|
| 547 |
+
</div>
|
| 548 |
+
</div>
|
| 549 |
+
<div class="overflow-x-auto">
|
| 550 |
+
<table class="min-w-full divide-y divide-gray-200">
|
| 551 |
+
<thead class="bg-gray-50">
|
| 552 |
+
<tr>
|
| 553 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Type</th>
|
| 554 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">URL</th>
|
| 555 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Dimensions</th>
|
| 556 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Source</th>
|
| 557 |
+
</tr>
|
| 558 |
+
</thead>
|
| 559 |
+
<tbody id="mediaTable" class="bg-white divide-y divide-gray-200">
|
| 560 |
+
<!-- Media will be inserted here -->
|
| 561 |
+
</tbody>
|
| 562 |
+
</table>
|
| 563 |
+
</div>
|
| 564 |
+
<div id="mediaEmpty" class="text-center py-12 hidden">
|
| 565 |
+
<i class="fas fa-image text-4xl text-gray-300 mb-3"></i>
|
| 566 |
+
<p class="text-gray-500">No media found matching your criteria</p>
|
| 567 |
+
</div>
|
| 568 |
+
</div>
|
| 569 |
+
|
| 570 |
+
<!-- Errors Tab -->
|
| 571 |
+
<div id="errorsTab" class="p-6 hidden">
|
| 572 |
+
<div class="flex justify-between items-center mb-4">
|
| 573 |
+
<h3 class="text-lg font-medium">Processing Errors</h3>
|
| 574 |
+
<div class="relative">
|
| 575 |
+
<input type="text" placeholder="Filter errors..." class="pl-8 pr-4 py-2 border border-gray-300 rounded-md text-sm focus:ring-indigo-500 focus:border-indigo-500" id="errorFilter">
|
| 576 |
+
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
|
| 577 |
+
<i class="fas fa-search text-gray-400"></i>
|
| 578 |
+
</div>
|
| 579 |
+
</div>
|
| 580 |
+
</div>
|
| 581 |
+
<div class="overflow-x-auto">
|
| 582 |
+
<table class="min-w-full divide-y divide-gray-200">
|
| 583 |
+
<thead class="bg-gray-50">
|
| 584 |
+
<tr>
|
| 585 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">URL</th>
|
| 586 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Error Type</th>
|
| 587 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Message</th>
|
| 588 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Timestamp</th>
|
| 589 |
+
</tr>
|
| 590 |
+
</thead>
|
| 591 |
+
<tbody id="errorsTable" class="bg-white divide-y divide-gray-200">
|
| 592 |
+
<!-- Errors will be inserted here -->
|
| 593 |
+
</tbody>
|
| 594 |
+
</table>
|
| 595 |
+
</div>
|
| 596 |
+
<div id="errorsEmpty" class="text-center py-12 hidden">
|
| 597 |
+
<i class="fas fa-check-circle text-4xl text-green-300 mb-3"></i>
|
| 598 |
+
<p class="text-gray-500">No errors encountered during processing</p>
|
| 599 |
+
</div>
|
| 600 |
+
</div>
|
| 601 |
+
</div>
|
| 602 |
+
</div>
|
| 603 |
+
</main>
|
| 604 |
+
|
| 605 |
+
<!-- Footer -->
|
| 606 |
+
<footer class="bg-gray-50 border-t border-gray-200 mt-12">
|
| 607 |
+
<div class="container mx-auto px-4 py-8">
|
| 608 |
+
<div class="flex flex-col md:flex-row justify-between items-center">
|
| 609 |
+
<div class="mb-4 md:mb-0">
|
| 610 |
+
<p class="text-sm text-gray-500">© <span id="currentYear"></span> Legal WebScraper Pro. All rights reserved.</p>
|
| 611 |
+
<p class="text-xs text-gray-400 mt-1">This tool complies with ethical web scraping guidelines and respects robots.txt</p>
|
| 612 |
+
</div>
|
| 613 |
+
<div class="flex space-x-4">
|
| 614 |
+
<a href="#" class="text-sm text-gray-500 hover:text-gray-700">Terms</a>
|
| 615 |
+
<a href="#" class="text-sm text-gray-500 hover:text-gray-700">Privacy</a>
|
| 616 |
+
<a href="#" class="text-sm text-gray-500 hover:text-gray-700">Contact</a>
|
| 617 |
+
</div>
|
| 618 |
+
</div>
|
| 619 |
+
</div>
|
| 620 |
+
</footer>
|
| 621 |
+
|
| 622 |
+
<script>
|
| 623 |
+
// Set current year
|
| 624 |
+
document.getElementById('currentYear').textContent = new Date().getFullYear();
|
| 625 |
+
|
| 626 |
+
// Tab switching functionality
|
| 627 |
+
const tabs = {
|
| 628 |
+
manualTab: document.getElementById('manualTab'),
|
| 629 |
+
fileTab: document.getElementById('fileTab'),
|
| 630 |
+
aggregatorTab: document.getElementById('aggregatorTab'),
|
| 631 |
+
manualContent: document.getElementById('manualContent'),
|
| 632 |
+
fileContent: document.getElementById('fileContent'),
|
| 633 |
+
aggregatorContent: document.getElementById('aggregatorContent')
|
| 634 |
+
};
|
| 635 |
+
|
| 636 |
+
tabs.manualTab.addEventListener('click', () => switchTab('manual'));
|
| 637 |
+
tabs.fileTab.addEventListener('click', () => switchTab('file'));
|
| 638 |
+
tabs.aggregatorTab.addEventListener('click', () => switchTab('aggregator'));
|
| 639 |
+
|
| 640 |
+
function switchTab(tab) {
|
| 641 |
+
// Reset all tabs
|
| 642 |
+
tabs.manualTab.classList.remove('tab-active');
|
| 643 |
+
tabs.manualTab.classList.add('text-gray-500', 'hover:text-gray-700');
|
| 644 |
+
tabs.fileTab.classList.remove('tab-active');
|
| 645 |
+
tabs.fileTab.classList.add('text-gray-500', 'hover:text-gray-700');
|
| 646 |
+
tabs.aggregatorTab.classList.remove('tab-active');
|
| 647 |
+
tabs.aggregatorTab.classList.add('text-gray-500', 'hover:text-gray-700');
|
| 648 |
+
|
| 649 |
+
tabs.manualContent.classList.add('hidden');
|
| 650 |
+
tabs.fileContent.classList.add('hidden');
|
| 651 |
+
tabs.aggregatorContent.classList.add('hidden');
|
| 652 |
+
|
| 653 |
+
// Activate selected tab
|
| 654 |
+
if (tab === 'manual') {
|
| 655 |
+
tabs.manualTab.classList.add('tab-active');
|
| 656 |
+
tabs.manualTab.classList.remove('text-gray-500', 'hover:text-gray-700');
|
| 657 |
+
tabs.manualContent.classList.remove('hidden');
|
| 658 |
+
} else if (tab === 'file') {
|
| 659 |
+
tabs.fileTab.classList.add('tab-active');
|
| 660 |
+
tabs.fileTab.classList.remove('text-gray-500', 'hover:text-gray-700');
|
| 661 |
+
tabs.fileContent.classList.remove('hidden');
|
| 662 |
+
} else if (tab === 'aggregator') {
|
| 663 |
+
tabs.aggregatorTab.classList.add('tab-active');
|
| 664 |
+
tabs.aggregatorTab.classList.remove('text-gray-500', 'hover:text-gray-700');
|
| 665 |
+
tabs.aggregatorContent.classList.remove('hidden');
|
| 666 |
+
}
|
| 667 |
+
}
|
| 668 |
+
|
| 669 |
+
// File upload handling
|
| 670 |
+
const dropZone = document.getElementById('dropZone');
|
| 671 |
+
const fileInput = document.getElementById('fileInput');
|
| 672 |
+
const fileInfo = document.getElementById('fileInfo');
|
| 673 |
+
const fileName = document.getElementById('fileName');
|
| 674 |
+
const fileSize = document.getElementById('fileSize');
|
| 675 |
+
const fileType = document.getElementById('fileType');
|
| 676 |
+
|
| 677 |
+
['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {
|
| 678 |
+
dropZone.addEventListener(eventName, preventDefaults, false);
|
| 679 |
+
});
|
| 680 |
+
|
| 681 |
+
function preventDefaults(e) {
|
| 682 |
+
e.preventDefault();
|
| 683 |
+
e.stopPropagation();
|
| 684 |
+
}
|
| 685 |
+
|
| 686 |
+
['dragenter', 'dragover'].forEach(eventName => {
|
| 687 |
+
dropZone.addEventListener(eventName, highlight, false);
|
| 688 |
+
});
|
| 689 |
+
|
| 690 |
+
['dragleave', 'drop'].forEach(eventName => {
|
| 691 |
+
dropZone.addEventListener(eventName, unhighlight, false);
|
| 692 |
+
});
|
| 693 |
+
|
| 694 |
+
function highlight() {
|
| 695 |
+
dropZone.classList.add('dragover');
|
| 696 |
+
}
|
| 697 |
+
|
| 698 |
+
function unhighlight() {
|
| 699 |
+
dropZone.classList.remove('dragover');
|
| 700 |
+
}
|
| 701 |
+
|
| 702 |
+
dropZone.addEventListener('drop', handleDrop, false);
|
| 703 |
+
|
| 704 |
+
function handleDrop(e) {
|
| 705 |
+
const dt = e.dataTransfer;
|
| 706 |
+
const files = dt.files;
|
| 707 |
+
handleFiles(files);
|
| 708 |
+
}
|
| 709 |
+
|
| 710 |
+
fileInput.addEventListener('change', function() {
|
| 711 |
+
handleFiles(this.files);
|
| 712 |
+
});
|
| 713 |
+
|
| 714 |
+
function handleFiles(files) {
|
| 715 |
+
if (files.length) {
|
| 716 |
+
const file = files[0];
|
| 717 |
+
fileName.textContent = file.name;
|
| 718 |
+
fileSize.textContent = formatFileSize(file.size);
|
| 719 |
+
fileType.textContent = file.type || file.name.split('.').pop();
|
| 720 |
+
fileInfo.classList.remove('hidden');
|
| 721 |
+
}
|
| 722 |
+
}
|
| 723 |
+
|
| 724 |
+
function formatFileSize(bytes) {
|
| 725 |
+
if (bytes === 0) return '0 Bytes';
|
| 726 |
+
const k = 1024;
|
| 727 |
+
const sizes = ['Bytes', 'KB', 'MB', 'GB'];
|
| 728 |
+
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
| 729 |
+
return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
|
| 730 |
+
}
|
| 731 |
+
|
| 732 |
+
// Advanced options toggle
|
| 733 |
+
const toggleAdvancedBtn = document.getElementById('toggleAdvancedBtn');
|
| 734 |
+
const advancedOptions = document.getElementById('advancedOptions');
|
| 735 |
+
|
| 736 |
+
toggleAdvancedBtn.addEventListener('click', function() {
|
| 737 |
+
if (advancedOptions.classList.contains('hidden')) {
|
| 738 |
+
advancedOptions.classList.remove('hidden');
|
| 739 |
+
toggleAdvancedBtn.textContent = 'Hide';
|
| 740 |
+
} else {
|
| 741 |
+
advancedOptions.classList.add('hidden');
|
| 742 |
+
toggleAdvancedBtn.textContent = 'Show';
|
| 743 |
+
}
|
| 744 |
+
});
|
| 745 |
+
|
| 746 |
+
// Request delay slider
|
| 747 |
+
const requestDelay = document.getElementById('requestDelay');
|
| 748 |
+
const delayValue = document.getElementById('delayValue');
|
| 749 |
+
|
| 750 |
+
requestDelay.addEventListener('input', function() {
|
| 751 |
+
delayValue.textContent = this.value + 's';
|
| 752 |
+
});
|
| 753 |
+
|
| 754 |
+
// User agent selection
|
| 755 |
+
const userAgent = document.getElementById('userAgent');
|
| 756 |
+
const customUserAgent = document.getElementById('customUserAgent');
|
| 757 |
+
|
| 758 |
+
userAgent.addEventListener('change', function() {
|
| 759 |
+
if (this.value === 'custom') {
|
| 760 |
+
customUserAgent.classList.remove('hidden');
|
| 761 |
+
} else {
|
| 762 |
+
customUserAgent.classList.add('hidden');
|
| 763 |
+
}
|
| 764 |
+
});
|
| 765 |
+
|
| 766 |
+
// Database select all toggle
|
| 767 |
+
const toggleDbBtn = document.getElementById('toggleDbBtn');
|
| 768 |
+
const dbCheckboxes = [
|
| 769 |
+
document.getElementById('censusCheck'),
|
| 770 |
+
document.getElementById('fccCheck'),
|
| 771 |
+
document.getElementById('uspsCheck'),
|
| 772 |
+
document.getElementById('dunsCheck')
|
| 773 |
+
];
|
| 774 |
+
|
| 775 |
+
let allSelected = true;
|
| 776 |
+
|
| 777 |
+
toggleDbBtn.addEventListener('click', function() {
|
| 778 |
+
allSelected = !allSelected;
|
| 779 |
+
dbCheckboxes.forEach(checkbox => {
|
| 780 |
+
checkbox.checked = allSelected;
|
| 781 |
+
});
|
| 782 |
+
toggleDbBtn.textContent = allSelected ? 'Deselect All' : 'Select All';
|
| 783 |
+
});
|
| 784 |
+
|
| 785 |
+
// Add sample URLs
|
| 786 |
+
const addSampleBtn = document.getElementById('addSampleBtn');
|
| 787 |
+
const urlInput = document.getElementById('urlInput');
|
| 788 |
+
|
| 789 |
+
addSampleBtn.addEventListener('click', function() {
|
| 790 |
+
const sampleUrls = [
|
| 791 |
+
'https://www.census.gov/',
|
| 792 |
+
'https://www.fcc.gov/',
|
| 793 |
+
'https://tools.usps.com/zip-code-lookup.htm',
|
| 794 |
+
'https://www.usa.gov/',
|
| 795 |
+
'https://www.data.gov/'
|
| 796 |
+
];
|
| 797 |
+
urlInput.value = sampleUrls.join('\n');
|
| 798 |
+
});
|
| 799 |
+
|
| 800 |
+
// Clear form
|
| 801 |
+
const clearBtn = document.getElementById('clearBtn');
|
| 802 |
+
|
| 803 |
+
clearBtn.addEventListener('click', function() {
|
| 804 |
+
document.getElementById('areaCode').value = '';
|
| 805 |
+
urlInput.value = '';
|
| 806 |
+
fileInput.value = '';
|
| 807 |
+
fileInfo.classList.add('hidden');
|
| 808 |
+
document.getElementById('searchTopic').value = '';
|
| 809 |
+
document.getElementById('resultLimit').value = '20';
|
| 810 |
+
document.getElementById('includeGovCheck').checked = true;
|
| 811 |
+
document.getElementById('includeEduCheck').checked = true;
|
| 812 |
+
dbCheckboxes.forEach(checkbox => {
|
| 813 |
+
checkbox.checked = true;
|
| 814 |
+
});
|
| 815 |
+
toggleDbBtn.textContent = 'Deselect All';
|
| 816 |
+
allSelected = true;
|
| 817 |
+
requestDelay.value = '3';
|
| 818 |
+
delayValue.textContent = '3s';
|
| 819 |
+
document.getElementById('respectRobots').checked = true;
|
| 820 |
+
document.getElementById('jsRendering').checked = false;
|
| 821 |
+
userAgent.value = 'default';
|
| 822 |
+
customUserAgent.classList.add('hidden');
|
| 823 |
+
customUserAgent.value = '';
|
| 824 |
+
});
|
| 825 |
+
|
| 826 |
+
// Start scraping
|
| 827 |
+
const startBtn = document.getElementById('startBtn');
|
| 828 |
+
const progressSection = document.getElementById('progressSection');
|
| 829 |
+
const resultsSection = document.getElementById('resultsSection');
|
| 830 |
+
|
| 831 |
+
startBtn.addEventListener('click', function() {
|
| 832 |
+
const areaCode = document.getElementById('areaCode').value.trim();
|
| 833 |
+
|
| 834 |
+
// Validate area code
|
| 835 |
+
if (!areaCode || !/^\d{3,5}$/.test(areaCode)) {
|
| 836 |
+
document.getElementById('areaCodeError').classList.remove('hidden');
|
| 837 |
+
return;
|
| 838 |
+
} else {
|
| 839 |
+
document.getElementById('areaCodeError').classList.add('hidden');
|
| 840 |
+
}
|
| 841 |
+
|
| 842 |
+
// Show progress section
|
| 843 |
+
progressSection.classList.remove('hidden');
|
| 844 |
+
document.getElementById('resultsSection').classList.add('hidden');
|
| 845 |
+
|
| 846 |
+
// Start the scraping simulation
|
| 847 |
+
simulateScraping();
|
| 848 |
+
});
|
| 849 |
+
|
| 850 |
+
// Stop scraping
|
| 851 |
+
const stopBtn = document.getElementById('stopBtn');
|
| 852 |
+
|
| 853 |
+
stopBtn.addEventListener('click', function() {
|
| 854 |
+
// In a real implementation, this would stop any ongoing requests
|
| 855 |
+
document.getElementById('statusText').textContent = 'Stopped by user';
|
| 856 |
+
document.getElementById('progressBar').style.width = '0%';
|
| 857 |
+
document.getElementById('progressText').textContent = '0%';
|
| 858 |
+
|
| 859 |
+
// Add to activity log
|
| 860 |
+
const logEntry = document.createElement('div');
|
| 861 |
+
logEntry.className = 'text-red-500';
|
| 862 |
+
logEntry.innerHTML = '<i class="fas fa-stop-circle mr-1"></i> Process stopped by user';
|
| 863 |
+
document.getElementById('activityLog').appendChild(logEntry);
|
| 864 |
+
});
|
| 865 |
+
|
| 866 |
+
// Results tabs
|
| 867 |
+
const resultTabs = document.querySelectorAll('[data-tab]');
|
| 868 |
+
|
| 869 |
+
resultTabs.forEach(tab => {
|
| 870 |
+
tab.addEventListener('click', function() {
|
| 871 |
+
// Remove active class from all tabs
|
| 872 |
+
resultTabs.forEach(t => {
|
| 873 |
+
t.classList.remove('tab-active');
|
| 874 |
+
t.classList.add('border-transparent', 'text-gray-500', 'hover:text-gray-700', 'hover:border-gray-300');
|
| 875 |
+
});
|
| 876 |
+
|
| 877 |
+
// Add active class to clicked tab
|
| 878 |
+
this.classList.add('tab-active');
|
| 879 |
+
this.classList.remove('border-transparent', 'text-gray-500', 'hover:text-gray-700', 'hover:border-gray-300');
|
| 880 |
+
|
| 881 |
+
// Hide all tab contents
|
| 882 |
+
document.getElementById('contactsTab').classList.add('hidden');
|
| 883 |
+
document.getElementById('addressesTab').classList.add('hidden');
|
| 884 |
+
document.getElementById('phonesTab').classList.add('hidden');
|
| 885 |
+
document.getElementById('linksTab').classList.add('hidden');
|
| 886 |
+
document.getElementById('mediaTab').classList.add('hidden');
|
| 887 |
+
document.getElementById('errorsTab').classList.add('hidden');
|
| 888 |
+
|
| 889 |
+
// Show selected tab content
|
| 890 |
+
const tabName = this.getAttribute('data-tab');
|
| 891 |
+
document.getElementById(`${tabName}Tab`).classList.remove('hidden');
|
| 892 |
+
});
|
| 893 |
+
});
|
| 894 |
+
|
| 895 |
+
// Export buttons
|
| 896 |
+
document.getElementById('exportCsvBtn').addEventListener('click', function() {
|
| 897 |
+
alert('CSV export functionality would be implemented here');
|
| 898 |
+
});
|
| 899 |
+
|
| 900 |
+
document.getElementById('exportJsonBtn').addEventListener('click', function() {
|
| 901 |
+
alert('JSON export functionality would be implemented here');
|
| 902 |
+
});
|
| 903 |
+
|
| 904 |
+
document.getElementById('exportPdfBtn').addEventListener('click', function() {
|
| 905 |
+
alert('PDF export functionality would be implemented here');
|
| 906 |
+
});
|
| 907 |
+
|
| 908 |
+
// Map view button
|
| 909 |
+
document.getElementById('mapViewBtn').addEventListener('click', function() {
|
| 910 |
+
alert('Map view functionality would be implemented here');
|
| 911 |
+
});
|
| 912 |
+
|
| 913 |
+
// Filter inputs
|
| 914 |
+
const filterInputs = [
|
| 915 |
+
{ id: 'contactFilter', table: 'contactsTable', empty: 'contactsEmpty' },
|
| 916 |
+
{ id: 'addressFilter', table: 'addressesTable', empty: 'addressesEmpty' },
|
| 917 |
+
{ id: 'phoneFilter', table: 'phonesTable', empty: 'phonesEmpty' },
|
| 918 |
+
{ id: 'linkFilter', table: 'linksTable', empty: 'linksEmpty' },
|
| 919 |
+
{ id: 'mediaFilter', table: 'mediaTable', empty: 'mediaEmpty' },
|
| 920 |
+
{ id: 'errorFilter', table: 'errorsTable', empty: 'errorsEmpty' }
|
| 921 |
+
];
|
| 922 |
+
|
| 923 |
+
filterInputs.forEach(filter => {
|
| 924 |
+
const input = document.getElementById(filter.id);
|
| 925 |
+
input.addEventListener('input', function() {
|
| 926 |
+
const value = this.value.toLowerCase();
|
| 927 |
+
const rows = document.getElementById(filter.table).getElementsByTagName('tr');
|
| 928 |
+
let visibleCount = 0;
|
| 929 |
+
|
| 930 |
+
for (let row of rows) {
|
| 931 |
+
const text = row.textContent.toLowerCase();
|
| 932 |
+
if (text.includes(value)) {
|
| 933 |
+
row.style.display = '';
|
| 934 |
+
visibleCount++;
|
| 935 |
+
} else {
|
| 936 |
+
row.style.display = 'none';
|
| 937 |
+
}
|
| 938 |
+
}
|
| 939 |
+
|
| 940 |
+
if (visibleCount === 0) {
|
| 941 |
+
document.getElementById(filter.empty).classList.remove('hidden');
|
| 942 |
+
} else {
|
| 943 |
+
document.getElementById(filter.empty).classList.add('hidden');
|
| 944 |
+
}
|
| 945 |
+
});
|
| 946 |
+
});
|
| 947 |
+
|
| 948 |
+
// Simulate scraping process
|
| 949 |
+
function simulateScraping() {
|
| 950 |
+
const statusText = document.getElementById('statusText');
|
| 951 |
+
const progressBar = document.getElementById('progressBar');
|
| 952 |
+
const progressText = document.getElementById('progressText');
|
| 953 |
+
const processedCount = document.getElementById('processedCount');
|
| 954 |
+
const totalCount = document.getElementById('totalCount');
|
| 955 |
+
const dataPoints = document.getElementById('dataPoints');
|
| 956 |
+
const errorCount = document.getElementById('errorCount');
|
| 957 |
+
const timeElapsed = document.getElementById('timeElapsed');
|
| 958 |
+
const activityLog = document.getElementById('activityLog');
|
| 959 |
+
|
| 960 |
+
let progress = 0;
|
| 961 |
+
let processed = 0;
|
| 962 |
+
const total = 24;
|
| 963 |
+
let dataPointsCount = 0;
|
| 964 |
+
let errors = 0;
|
| 965 |
+
let seconds = 0;
|
| 966 |
+
|
| 967 |
+
totalCount.textContent = total;
|
| 968 |
+
|
| 969 |
+
// Start timer
|
| 970 |
+
const timer = setInterval(() => {
|
| 971 |
+
seconds++;
|
| 972 |
+
const minutes = Math.floor(seconds / 60);
|
| 973 |
+
const remainingSeconds = seconds % 60;
|
| 974 |
+
timeElapsed.textContent = `${minutes.toString().padStart(2, '0')}:${remainingSeconds.toString().padStart(2, '0')}`;
|
| 975 |
+
}, 1000);
|
| 976 |
+
|
| 977 |
+
// Simulate progress
|
| 978 |
+
const interval = setInterval(() => {
|
| 979 |
+
if (progress >= 100) {
|
| 980 |
+
clearInterval(interval);
|
| 981 |
+
clearInterval(timer);
|
| 982 |
+
statusText.textContent = 'Completed';
|
| 983 |
+
|
| 984 |
+
// Show results section
|
| 985 |
+
progressSection.classList.add('hidden');
|
| 986 |
+
resultsSection.classList.remove('hidden');
|
| 987 |
+
document.getElementById('exportBtn').classList.remove('hidden');
|
| 988 |
+
|
| 989 |
+
// Populate results
|
| 990 |
+
populateResults();
|
| 991 |
+
return;
|
| 992 |
+
}
|
| 993 |
+
|
| 994 |
+
progress += Math.floor(Math.random() * 5) + 1;
|
| 995 |
+
if (progress > 100) progress = 100;
|
| 996 |
+
|
| 997 |
+
processed += Math.floor(Math.random() * 2) + 1;
|
| 998 |
+
if (processed > total) processed = total;
|
| 999 |
+
|
| 1000 |
+
dataPointsCount += Math.floor(Math.random() * 3) + 1;
|
| 1001 |
+
|
| 1002 |
+
// Random chance of error
|
| 1003 |
+
if (Math.random() < 0.1) {
|
| 1004 |
+
errors++;
|
| 1005 |
+
const logEntry = document.createElement('div');
|
| 1006 |
+
logEntry.className = 'text-red-500';
|
| 1007 |
+
logEntry.innerHTML = `<i class="fas fa-exclamation-circle mr-1"></i> Error processing URL ${processed}/${total}: Connection timeout`;
|
| 1008 |
+
activityLog.appendChild(logEntry);
|
| 1009 |
+
activityLog.scrollTop = activityLog.scrollHeight;
|
| 1010 |
+
} else {
|
| 1011 |
+
const logEntry = document.createElement('div');
|
| 1012 |
+
logEntry.className = 'text-green-600';
|
| 1013 |
+
logEntry.innerHTML = `<i class="fas fa-check-circle mr-1"></i> Successfully processed URL ${processed}/${total}`;
|
| 1014 |
+
activityLog.appendChild(logEntry);
|
| 1015 |
+
activityLog.scrollTop = activityLog.scrollHeight;
|
| 1016 |
+
}
|
| 1017 |
+
|
| 1018 |
+
// Update status randomly
|
| 1019 |
+
const statuses = [
|
| 1020 |
+
'Scraping websites...',
|
| 1021 |
+
'Processing national databases...',
|
| 1022 |
+
'Extracting contact information...',
|
| 1023 |
+
'Identifying phone numbers...',
|
| 1024 |
+
'Locating addresses...',
|
| 1025 |
+
'Analyzing media files...',
|
| 1026 |
+
'Compiling results...'
|
| 1027 |
+
];
|
| 1028 |
+
|
| 1029 |
+
if (Math.random() < 0.2) {
|
| 1030 |
+
statusText.textContent = statuses[Math.floor(Math.random() * statuses.length)];
|
| 1031 |
+
}
|
| 1032 |
+
|
| 1033 |
+
// Update UI
|
| 1034 |
+
progressBar.style.width = `${progress}%`;
|
| 1035 |
+
progressText.textContent = `${progress}%`;
|
| 1036 |
+
processedCount.textContent = processed;
|
| 1037 |
+
dataPoints.textContent = dataPointsCount;
|
| 1038 |
+
errorCount.textContent = errors;
|
| 1039 |
+
}, 500);
|
| 1040 |
+
}
|
| 1041 |
+
|
| 1042 |
+
// Populate results with sample data
|
| 1043 |
+
function populateResults() {
|
| 1044 |
+
// Update summary cards
|
| 1045 |
+
document.getElementById('sourcesProcessed').textContent = '24';
|
| 1046 |
+
document.getElementById('successRate').textContent = '92';
|
| 1047 |
+
document.getElementById('totalDataPoints').textContent = '137';
|
| 1048 |
+
document.getElementById('uniqueData').textContent = '89';
|
| 1049 |
+
document.getElementById('areaCodeMatches').textContent = '18';
|
| 1050 |
+
document.getElementById('relatedMatches').textContent = '42';
|
| 1051 |
+
|
| 1052 |
+
// Sample contacts
|
| 1053 |
+
const sampleContacts = [
|
| 1054 |
+
{ name: "John Smith", title: "Director of Communications", email: "john.smith@example.gov", phone: "(202) 555-0123", source: "https://www.example.gov/about" },
|
| 1055 |
+
{ name: "Sarah Johnson", title: "Public Records Officer", email: "sjohnson@cityhall.org", phone: "(202) 555-0456", source: "https://cityhall.org/contact" },
|
| 1056 |
+
{ name: "Robert Chen", title: "IT Administrator", email: "r.chen@university.edu", phone: "(617) 555-0789", source: "https://university.edu/staff" },
|
| 1057 |
+
{ name: "Maria Garcia", title: "Customer Service Manager", email: "maria.garcia@business.com", phone: "(800) 555-0987", source: "https://business.com/team" },
|
| 1058 |
+
{ name: "David Wilson", title: "Legal Counsel", email: "dwilson@lawfirm.org", phone: "(212) 555-0321", source: "https://lawfirm.org/attorneys" }
|
| 1059 |
+
];
|
| 1060 |
+
|
| 1061 |
+
const contactsTable = document.getElementById('contactsTable');
|
| 1062 |
+
sampleContacts.forEach(contact => {
|
| 1063 |
+
const row = document.createElement('tr');
|
| 1064 |
+
row.innerHTML = `
|
| 1065 |
+
<td class="px-6 py-4 whitespace-nowrap">${contact.name}</td>
|
| 1066 |
+
<td class="px-6 py-4 whitespace-nowrap">${contact.title}</td>
|
| 1067 |
+
<td class="px-6 py-4 whitespace-nowrap"><a href="mailto:${contact.email}" class="text-blue-600 hover:text-blue-800">${contact.email}</a></td>
|
| 1068 |
+
<td class="px-6 py-4 whitespace-nowrap">${contact.phone}</td>
|
| 1069 |
+
<td class="px-6 py-4 whitespace-nowrap"><a href="${contact.source}" target="_blank" class="text-blue-600 hover:text-blue-800">View source</a></td>
|
| 1070 |
+
`;
|
| 1071 |
+
contactsTable.appendChild(row);
|
| 1072 |
+
});
|
| 1073 |
+
|
| 1074 |
+
// Sample addresses
|
| 1075 |
+
const sampleAddresses = [
|
| 1076 |
+
{ address: "1600 Pennsylvania Ave NW<br>Washington, DC 20500", type: "Government", coordinates: "38.8977° N, 77.0365° W", source: "https://www.example.gov/contact" },
|
| 1077 |
+
{ address: "1 City Hall Plaza<br>Boston, MA 02201", type: "Municipal", coordinates: "42.3601° N, 71.0589° W", source: "https://cityhall.org/locations" },
|
| 1078 |
+
{ address: "350 5th Ave<br>New York, NY 10118", type: "Business", coordinates: "40.7484° N, 73.9857° W", source: "https://business.com/locations" },
|
| 1079 |
+
{ address: "1 Harvard Yard<br>Cambridge, MA 02138", type: "Educational", coordinates: "42.3744° N, 71.1169° W", source: "https://university.edu/campus" }
|
| 1080 |
+
];
|
| 1081 |
+
|
| 1082 |
+
const addressesTable = document.getElementById('addressesTable');
|
| 1083 |
+
sampleAddresses.forEach(address => {
|
| 1084 |
+
const row = document.createElement('tr');
|
| 1085 |
+
row.innerHTML = `
|
| 1086 |
+
<td class="px-6 py-4">${address.address}</td>
|
| 1087 |
+
<td class="px-6 py-4 whitespace-nowrap">${address.type}</td>
|
| 1088 |
+
<td class="px-6 py-4 whitespace-nowrap">${address.coordinates}</td>
|
| 1089 |
+
<td class="px-6 py-4 whitespace-nowrap"><a href="${address.source}" target="_blank" class="text-blue-600 hover:text-blue-800">View source</a></td>
|
| 1090 |
+
`;
|
| 1091 |
+
addressesTable.appendChild(row);
|
| 1092 |
+
});
|
| 1093 |
+
|
| 1094 |
+
// Sample phone numbers
|
| 1095 |
+
const samplePhones = [
|
| 1096 |
+
{ number: "(202) 555-0123", type: "Main Office", context: "Government contact page", source: "https://www.example.gov/contact" },
|
| 1097 |
+
{ number: "(800) 555-1234", type: "Customer Service", context: "Business homepage footer", source: "https://business.com" },
|
| 1098 |
+
{ number: "(617) 555-9876", type: "Admissions", context: "University contact page", source: "https://university.edu/contact" },
|
| 1099 |
+
{ number: "(212) 555-4567", type: "Legal Department", context: "Law firm staff directory", source: "https://lawfirm.org/staff" }
|
| 1100 |
+
];
|
| 1101 |
+
|
| 1102 |
+
const phonesTable = document.getElementById('phonesTable');
|
| 1103 |
+
samplePhones.forEach(phone => {
|
| 1104 |
+
const row = document.createElement('tr');
|
| 1105 |
+
row.innerHTML = `
|
| 1106 |
+
<td class="px-6 py-4 whitespace-nowrap">${phone.number}</td>
|
| 1107 |
+
<td class="px-6 py-4 whitespace-nowrap">${phone.type}</td>
|
| 1108 |
+
<td class="px-6 py-4">${phone.context}</td>
|
| 1109 |
+
<td class="px-6 py-4 whitespace-nowrap"><a href="${phone.source}" target="_blank" class="text-blue-600 hover:text-blue-800">View source</a></td>
|
| 1110 |
+
`;
|
| 1111 |
+
phonesTable.appendChild(row);
|
| 1112 |
+
});
|
| 1113 |
+
|
| 1114 |
+
// Sample links
|
| 1115 |
+
const sampleLinks = [
|
| 1116 |
+
{ url: "https://www.example.gov/privacy", anchor: "Privacy Policy", domain: "example.gov", source: "https://www.example.gov" },
|
| 1117 |
+
{ url: "https://business.com/terms", anchor: "Terms of Service", domain: "business.com", source: "https://business.com" },
|
| 1118 |
+
{ url: "https://university.edu/admissions", anchor: "Admissions Information", domain: "university.edu", source: "https://university.edu" },
|
| 1119 |
+
{ url: "https://lawfirm.org/contact", anchor: "Contact Our Team", domain: "lawfirm.org", source: "https://lawfirm.org" }
|
| 1120 |
+
];
|
| 1121 |
+
|
| 1122 |
+
const linksTable = document.getElementById('linksTable');
|
| 1123 |
+
sampleLinks.forEach(link => {
|
| 1124 |
+
const row = document.createElement('tr');
|
| 1125 |
+
row.innerHTML = `
|
| 1126 |
+
<td class="px-6 py-4"><a href="${link.url}" target="_blank" class="text-blue-600 hover:text-blue-800">${link.url}</a></td>
|
| 1127 |
+
<td class="px-6 py-4">${link.anchor}</td>
|
| 1128 |
+
<td class="px-6 py-4 whitespace-nowrap">${link.domain}</td>
|
| 1129 |
+
<td class="px-6 py-4 whitespace-nowrap"><a href="${link.source}" target="_blank" class="text-blue-600 hover:text-blue-800">View source</a></td>
|
| 1130 |
+
`;
|
| 1131 |
+
linksTable.appendChild(row);
|
| 1132 |
+
});
|
| 1133 |
+
|
| 1134 |
+
// Sample media
|
| 1135 |
+
const sampleMedia = [
|
| 1136 |
+
{ type: "JPEG Image", url: "https://www.example.gov/images/logo.jpg", dimensions: "300×150", source: "https://www.example.gov" },
|
| 1137 |
+
{ type: "PDF Document", url: "https://business.com/docs/annual-report.pdf", dimensions: "24 pages", source: "https://business.com" },
|
| 1138 |
+
{ type: "PNG Image", url: "https://university.edu/images/campus.png", dimensions: "1200×800", source: "https://university.edu" },
|
| 1139 |
+
{ type: "MP4 Video", url: "https://lawfirm.org/videos/welcome.mp4", dimensions: "1280×720", source: "https://lawfirm.org" }
|
| 1140 |
+
];
|
| 1141 |
+
|
| 1142 |
+
const mediaTable = document.getElementById('mediaTable');
|
| 1143 |
+
sampleMedia.forEach(media => {
|
| 1144 |
+
const row = document.createElement('tr');
|
| 1145 |
+
row.innerHTML = `
|
| 1146 |
+
<td class="px-6 py-4 whitespace-nowrap">${media.type}</td>
|
| 1147 |
+
<td class="px-6 py-4"><a href="${media.url}" target="_blank" class="text-blue-600 hover:text-blue-800">${media.url}</a></td>
|
| 1148 |
+
<td class="px-6 py-4 whitespace-nowrap">${media.dimensions}</td>
|
| 1149 |
+
<td class="px-6 py-4 whitespace-nowrap"><a href="${media.source}" target="_blank" class="text-blue-600 hover:text-blue-800">View source</a></td>
|
| 1150 |
+
`;
|
| 1151 |
+
mediaTable.appendChild(row);
|
| 1152 |
+
});
|
| 1153 |
+
|
| 1154 |
+
// Sample errors
|
| 1155 |
+
const sampleErrors = [
|
| 1156 |
+
{ url: "https://blocked-site.org", error: "403 Forbidden", message: "Access denied by robots.txt", timestamp: "00:01:23" },
|
| 1157 |
+
{ url: "https://timeout-example.com", error: "Timeout", message: "Server did not respond in time", timestamp: "00:02:45" }
|
| 1158 |
+
];
|
| 1159 |
+
|
| 1160 |
+
const errorsTable = document.getElementById('errorsTable');
|
| 1161 |
+
sampleErrors.forEach(error => {
|
| 1162 |
+
const row = document.createElement('tr');
|
| 1163 |
+
row.innerHTML = `
|
| 1164 |
+
<td class="px-6 py-4"><a href="${error.url}" target="_blank" class="text-blue-600 hover:text-blue-800">${error.url}</a></td>
|
| 1165 |
+
<td class="px-6 py-4 whitespace-nowrap">${error.error}</td>
|
| 1166 |
+
<td class="px-6 py-4">${error.message}</td>
|
| 1167 |
+
<td class="px-6 py-4 whitespace-nowrap">${error.timestamp}</td>
|
| 1168 |
+
`;
|
| 1169 |
+
errorsTable.appendChild(row);
|
| 1170 |
+
});
|
| 1171 |
+
}
|
| 1172 |
+
</script>
|
| 1173 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=MarcRyan/area-code-focused-data-extraction-tool" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 1174 |
+
</html>
|
prompts.txt
ADDED
|
File without changes
|