Spaces:
Running
Running
File size: 26,292 Bytes
a1dbed2 | 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 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LiveScrape - Web Scraping Tool</title>
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
'primary-blue': '#2563EB',
'dark-blue': '#1D4ED8',
'light-blue': '#DBEAFE',
}
}
}
}
</script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
@keyframes pulse {
0% { transform: scale(1); opacity: 1; }
50% { transform: scale(1.05); opacity: 0.8; }
100% { transform: scale(1); opacity: 1; }
}
.animate-pulse-slow {
animation: pulse 3s infinite;
}
.progress-bar {
transition: width 0.5s ease-in-out;
}
.scrape-card {
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.scrape-card:hover {
transform: translateY(-5px);
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.preview-table {
max-height: 300px;
overflow-y: auto;
}
.status-badge {
animation: ping 1.5s cubic-bezier(0,0,0.2,1) infinite;
}
@keyframes ping {
75%, 100% { transform: scale(1.5); opacity: 0; }
}
</style>
</head>
<body class="bg-gray-50 min-h-screen">
<!-- Navigation -->
<nav class="bg-gray-900 text-white shadow-lg">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex items-center justify-between h-16">
<div class="flex items-center space-x-3">
<div class="bg-primary-blue p-2 rounded-lg">
<i class="fas fa-cloud-download-alt text-white text-2xl"></i>
</div>
<a href="#" class="text-xl font-bold text-white">Live<span class="text-primary-blue">Scrape</span></a>
</div>
<div class="hidden md:block">
<div class="ml-10 flex items-baseline space-x-4">
<a href="#" class="text-primary-blue px-3 py-2 rounded-md text-sm font-medium">Dashboard</a>
<a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">How It Works</a>
<a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Privacy Policy</a>
</div>
</div>
<div class="md:hidden flex items-center">
<button id="mobile-menu-button" class="text-gray-400 hover:text-white focus:outline-none">
<i class="fas fa-bars text-xl"></i>
</button>
</div>
</div>
</div>
</nav>
<!-- Main Content -->
<div class="max-w-7xl mx-auto py-12 px-4 sm:px-6 lg:px-8">
<div class="text-center mb-16">
<h1 class="text-4xl font-extrabold text-gray-900 sm:text-5xl sm:tracking-tight">
Web Scraping Made <span class="text-primary-blue">Effortless</span>
</h1>
<p class="mt-5 max-w-xl mx-auto text-xl text-gray-500">
Extract structured data from the web in real-time. Export directly to spreadsheets with one click.
</p>
</div>
<div class="flex flex-col lg:flex-row gap-8">
<!-- Input Form -->
<div class="lg:w-1/2">
<div class="bg-white shadow-xl rounded-2xl overflow-hidden scrape-card">
<div class="bg-gradient-to-r from-primary-blue to-purple-600 py-4 px-6">
<h2 class="text-white text-2xl font-bold flex items-center">
<i class="fas fa-search mr-3"></i> Search & Scrape Data
</h2>
</div>
<div class="p-6">
<div class="mb-6">
<label class="block text-gray-700 font-medium mb-2">Enter Search Query</label>
<div class="flex">
<input
type="text"
class="flex-1 py-3 px-4 border border-gray-300 rounded-l-lg focus:outline-none focus:ring-2 focus:ring-primary-blue"
placeholder="e.g., 'top hospitals in New York' or 'IT companies in Bangalore'"
id="search-query"
>
<button class="bg-primary-blue hover:bg-dark-blue text-white font-semibold py-3 px-6 rounded-r-lg flex items-center transition duration-300" id="scrape-btn">
<i class="fas fa-bolt mr-2 animate-pulse-slow text-yellow-300"></i> Scrape
</button>
</div>
<p class="mt-2 text-sm text-gray-500">Enter any search term to scrape real-time data</p>
</div>
<div class="mb-6 relative">
<label class="block text-gray-700 font-medium mb-2">Scraping Status</label>
<div class="bg-gray-100 rounded-lg p-4 border border-gray-200">
<div id="status-container" class="hidden">
<div class="flex items-center justify-between mb-2">
<div class="flex items-center">
<span class="flex h-4 w-4 relative">
<span class="status-badge animate-ping absolute inline-flex h-full w-full rounded-full bg-primary-blue opacity-75"></span>
<span class="relative inline-flex rounded-full h-4 w-4 bg-primary-blue"></span>
</span>
<span class="ml-2 font-medium text-gray-800" id="status-text">Accessing search engines</span>
</div>
<div class="text-sm text-primary-blue font-medium" id="progress-text">0%</div>
</div>
<div class="w-full bg-gray-300 rounded-full h-2.5">
<div class="bg-primary-blue h-2.5 rounded-full progress-bar" style="width: 0%;" id="progress-bar"></div>
</div>
</div>
<div id="status-placeholder" class="text-center text-gray-500 py-4">
<i class="fas fa-search fa-2x"></i>
<p class="mt-2">Your scraping results will appear here</p>
</div>
</div>
</div>
<div class="mb-4">
<div class="flex items-center justify-between mb-4">
<label class="block text-gray-700 font-medium">Export Format</label>
<div class="text-sm text-gray-500" id="record-count">0 records</div>
</div>
<div class="flex space-x-4">
<div class="flex-1">
<button
id="download-csv"
class="w-full py-3 bg-gradient-to-r from-blue-500 to-green-500 text-white font-bold rounded-lg hover:opacity-90 transition duration-300 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center"
disabled
>
<i class="far fa-file-alt mr-2"></i> Download CSV
</button>
</div>
<div class="flex-1">
<button
id="download-xlsx"
class="w-full py-3 bg-gradient-to-r from-green-500 to-blue-700 text-white font-bold rounded-lg hover:opacity-90 transition duration-300 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center"
disabled
>
<i class="far fa-file-excel mr-2"></i> Download Excel
</button>
</div>
</div>
</div>
</div>
</div>
<div class="mt-8 bg-white shadow-lg p-6 rounded-2xl">
<h3 class="font-bold text-xl text-gray-800 mb-4 flex items-center">
<i class="fas fa-lightbulb mr-2 text-yellow-500"></i> Pro Tips
</h3>
<ul class="space-y-3">
<li class="flex items-start">
<i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
<span>Be specific with your search for more accurate results (e.g., "Top 10 hospitals in Chicago")</span>
</li>
<li class="flex items-start">
<i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
<span>Include location for place-specific results (e.g., "IT companies in London")</span>
</li>
<li class="flex items-start">
<i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
<span>Your searches are processed in real-time and results are never stored</span>
</li>
</ul>
</div>
</div>
<!-- Results Preview -->
<div class="lg:w-1/2">
<div class="bg-white shadow-xl rounded-2xl overflow-hidden h-full scrape-card">
<div class="bg-gradient-to-r from-purple-600 to-indigo-700 py-4 px-6">
<h2 class="text-white text-2xl font-bold flex items-center">
<i class="fas fa-table mr-3"></i> Results Preview
</h2>
</div>
<div class="p-6 h-full">
<div class="mb-4">
<div class="flex items-center justify-between">
<h3 class="font-bold text-gray-800">Data Preview <span class="text-sm text-gray-600">(first 10 results)</span></h3>
<div class="text-sm bg-blue-100 text-primary-blue px-3 py-1 rounded-full font-medium" id="result-source">Source: Google</div>
</div>
</div>
<div class="preview-table bg-white border border-gray-200 rounded-lg overflow-hidden">
<div class="relative overflow-x-auto">
<table class="w-full text-sm text-left text-gray-500">
<thead class="text-xs uppercase bg-gray-50 text-gray-700">
<tr>
<th scope="col" class="px-6 py-3">
Name
</th>
<th scope="col" class="px-6 py-3">
Address
</th>
<th scope="col" class="px-6 py-3">
Phone
</th>
<th scope="col" class="px-6 py-3">
Rating
</th>
</tr>
</thead>
<tbody id="result-preview">
<tr class="text-center py-12">
<td colspan="4" class="py-16">
<i class="fas fa-inbox text-gray-300 text-5xl mb-4"></i>
<p class="text-gray-500">Preview your scraped data here</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="mt-6">
<h3 class="font-bold text-gray-800 mb-3 flex items-center">
<i class="fas fa-user-shield mr-2"></i> Ethical Scraping Practices
</h3>
<div class="flex flex-wrap gap-2">
<div class="bg-green-100 text-green-800 text-xs font-medium px-3 py-1 rounded-full">
Robots.txt Compliant
</div>
<div class="bg-yellow-100 text-yellow-800 text-xs font-medium px-3 py-1 rounded-full">
Rate Limited
</div>
<div class="bg-blue-100 text-blue-800 text-xs font-medium px-3 py-1 rounded-full">
Public Data Only
</div>
<div class="bg-purple-100 text-purple-800 text-xs font-medium px-3 py-1 rounded-full">
No Personal Data
</div>
<div class="bg-pink-100 text-pink-800 text-xs font-medium px-3 py-1 rounded-full">
2s Delay Between Requests
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Footer -->
<footer class="bg-gray-900 text-white py-12 mt-16">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex flex-col md:flex-row justify-between">
<div class="mb-6 md:mb-0">
<div class="flex items-center space-x-3">
<div class="bg-primary-blue p-2 rounded-lg">
<i class="fas fa-cloud-download-alt text-white text-xl"></i>
</div>
<a href="#" class="text-xl font-bold text-white">Live<span class="text-primary-blue">Scrape</span></a>
</div>
<p class="mt-4 max-w-xs text-gray-400">
Web scraping tool for ethically collecting and exporting publicly available data.
</p>
</div>
<div class="grid grid-cols-2 md:grid-cols-3 gap-8">
<div>
<h3 class="text-lg font-semibold mb-4">Resources</h3>
<ul class="space-y-2">
<li><a href="#" class="text-gray-400 hover:text-white transition">Documentation</a></li>
<li><a href="#" class="text-gray-400 hover:text-white transition">API Reference</a></li>
<li><a href="#" class="text-gray-400 hover:text-white transition">Tutorials</a></li>
</ul>
</div>
<div>
<h3 class="text-lg font-semibold mb-4">Company</h3>
<ul class="space-y-2">
<li><a href="#" class="text-gray-400 hover:text-white transition">About</a></li>
<li><a href="#" class="text-gray-400 hover:text-white transition">Blog</a></li>
<li><a href="#" class="text-gray-400 hover:text-white transition">Careers</a></li>
</ul>
</div>
<div>
<h3 class="text-lg font-semibold mb-4">Legal</h3>
<ul class="space-y-2">
<li><a href="#" class="text-gray-400 hover:text-white transition">Privacy</a></li>
<li><a href="#" class="text-gray-400 hover:text-white transition">Terms</a></li>
<li><a href="#" class="text-gray-400 hover:text-white transition">Compliance</a></li>
</ul>
</div>
</div>
</div>
<div class="mt-12 pt-8 border-t border-gray-800 text-sm text-gray-400 text-center">
© 2023 LiveScrape. All rights reserved.
</div>
</div>
</footer>
<script>
document.addEventListener('DOMContentLoaded', function() {
const scrapeBtn = document.getElementById('scrape-btn');
const downloadCsvBtn = document.getElementById('download-csv');
const downloadXlsxBtn = document.getElementById('download-xlsx');
const searchInput = document.getElementById('search-query');
const statusContainer = document.getElementById('status-container');
const statusPlaceholder = document.getElementById('status-placeholder');
const statusText = document.getElementById('status-text');
const progressText = document.getElementById('progress-text');
const progressBar = document.getElementById('progress-bar');
const resultPreview = document.getElementById('result-preview');
const recordCount = document.getElementById('record-count');
const resultSource = document.getElementById('result-source');
// Sample data for demonstration
const sampleData = [
{name: "New York Medical Center", address: "123 Medical Dr, New York", phone: "(212) 555-1234", rating: "4.8"},
{name: "Manhattan General Hospital", address: "456 Health Ave, Manhattan", phone: "(212) 555-5678", rating: "4.6"},
{name: "Central City Metro Health", address: "789 Care Blvd, Brooklyn", phone: "(718) 555-4321", rating: "4.7"},
{name: "Queen's Medical Center", address: "101 Forest Hills Ln, Queens", phone: "(718) 555-9876", rating: "4.5"},
{name: "Bronx Community Hospital", address: "321 Wellness Rd, Bronx", phone: "(917) 555-6789", rating: "4.3"},
{name: "Staten Island Health", address: "987 Healers Way, Staten Island", phone: "(347) 555-4567", rating: "4.4"},
{name: "Downtown Medical Plaza", address: "654 Center St, Manhattan", phone: "(646) 555-2345", rating: "4.2"},
{name: "Upper East Side Health", address: "789 Park Ave, New York", phone: "(212) 555-8765", rating: "4.9"},
{name: "West Side Urgent Care", address: "567 Broadway, New York", phone: "(212) 555-2341", rating: "4.3"},
{name: "City Children's Hospital", address: "333 Hope Ave, Bronx", phone: "(201) 555-8765", rating: "4.8"},
];
// Simulate scraping progress
function simulateScraping() {
if (!searchInput.value.trim()) {
alert('Please enter a search query');
return;
}
// Show status container
statusPlaceholder.classList.add('hidden');
statusContainer.classList.remove('hidden');
// Disable button while scraping
scrapeBtn.disabled = true;
scrapeBtn.innerHTML = '<i class="fas fa-spinner fa-spin mr-2"></i> Scraping...';
// Reset progress
let progress = 0;
progressBar.style.width = '0%';
progressText.textContent = '0%';
// Create fake progress for demo
const interval = setInterval(() => {
progress += Math.floor(Math.random() * 15) + 5;
if (progress >= 100) progress = 100;
progressBar.style.width = `${progress}%`;
progressText.textContent = `${progress}%`;
// Update status text based on progress
if (progress < 25) {
statusText.textContent = "Accessing search engines...";
} else if (progress < 50) {
statusText.textContent = "Retrieving search results...";
} else if (progress < 75) {
statusText.textContent = "Scraping data from search results...";
} else if (progress < 95) {
statusText.textContent = "Cleaning and structuring data...";
} else {
statusText.textContent = "Preparing for export...";
}
if (progress === 100) {
clearInterval(interval);
setTimeout(finishScraping, 800);
}
}, 500);
}
// Finish scraping simulation
function finishScraping() {
// Reset button
scrapeBtn.disabled = false;
scrapeBtn.innerHTML = '<i class="fas fa-bolt mr-2 animate-pulse-slow text-yellow-300"></i> Scrape';
// Enable download buttons
downloadCsvBtn.disabled = false;
downloadXlsxBtn.disabled = false;
// Display success status
statusText.innerHTML = '<i class="fas fa-check-circle text-green-500 mr-2"></i> Scraping complete!';
// Update record counter
recordCount.textContent = `${sampleData.length} records`;
// Set result source (random example)
const sources = ['Google', 'Bing', "DuckDuckGo", 'Public Data Source'];
resultSource.textContent = `Source: ${sources[Math.floor(Math.random() * sources.length)]}`;
// Show preview data
resultPreview.innerHTML = '';
sampleData.forEach((item, index) => {
const row = document.createElement('tr');
row.className = index % 2 === 0 ? 'bg-white border-b' : 'bg-gray-50 border-b';
row.innerHTML = `
<th scope="row" class="px-6 py-4 font-medium text-gray-900">
${item.name}
</th>
<td class="px-6 py-4">
${item.address}
</td>
<td class="px-6 py-4">
${item.phone}
</td>
<td class="px-6 py-4">
<div class="inline-flex items-center bg-yellow-100 text-yellow-800 text-sm px-2 py-1 rounded">
<i class="fas fa-star mr-1 text-yellow-500"></i> ${item.rating}
</div>
</td>
`;
resultPreview.appendChild(row);
});
}
// Download functions (simulated)
function downloadCsv() {
alert(`CSV download started for: ${searchInput.value || 'your search'}`);
}
function downloadXlsx() {
alert(`Excel download started for: ${searchInput.value || 'your search'}`);
}
// Event listeners
scrapeBtn.addEventListener('click', simulateScraping);
downloadCsvBtn.addEventListener('click', downloadCsv);
downloadXlsxBtn.addEventListener('click', downloadXlsx);
// Enable scraping if Enter is pressed in the search box
searchInput.addEventListener('keypress', function(e) {
if (e.key === 'Enter') {
simulateScraping();
}
});
});
</script>
<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=madansa7/webscrapper" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |