webscraper / index.html
tjksecurity's picture
Add 3 files
9c5e453 verified
Raw History Blame Contribute Delete
42.9 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>WebScrape Pro - Scraping Tool</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.sidebar {
transition: all 0.3s ease;
}
.tab-content {
display: none;
}
.tab-content.active {
display: block;
}
.progress-bar {
transition: width 0.3s ease;
}
#resultsTable {
font-size: 0.85rem;
}
#resultsTable th {
position: sticky;
top: 0;
background-color: #f8fafc;
}
.custom-scrollbar::-webkit-scrollbar {
width: 6px;
height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
background: #f1f1f1;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
background: #888;
border-radius: 3px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
background: #555;
}
</style>
</head>
<body class="bg-gray-50 text-gray-800 font-sans">
<div class="flex h-screen overflow-hidden">
<!-- Sidebar -->
<div class="sidebar w-64 bg-gray-800 text-gray-100 flex flex-col">
<div class="p-4 border-b border-gray-700">
<h1 class="text-xl font-bold flex items-center">
<i class="fas fa-spider mr-2"></i>
WebScrape Pro
</h1>
<p class="text-xs text-gray-400 mt-1">v1.0.0</p>
</div>
<div class="flex-1 overflow-y-auto custom-scrollbar">
<div class="p-4">
<div class="mb-6">
<h3 class="text-sm font-semibold text-gray-400 uppercase tracking-wider mb-2">Scraping Tools</h3>
<ul>
<li class="mb-1">
<a href="#" class="flex items-center px-3 py-2 rounded text-gray-200 hover:bg-gray-700 tab-link active" data-tab="harvester">
<i class="fas fa-search mr-2"></i> URL Harvester
</a>
</li>
<li class="mb-1">
<a href="#" class="flex items-center px-3 py-2 rounded text-gray-200 hover:bg-gray-700 tab-link" data-tab="checker">
<i class="fas fa-check-circle mr-2"></i> Link Checker
</a>
</li>
<li class="mb-1">
<a href="#" class="flex items-center px-3 py-2 rounded text-gray-200 hover:bg-gray-700 tab-link" data-tab="scraper">
<i class="fas fa-download mr-2"></i> Content Scraper
</a>
</li>
<li class="mb-1">
<a href="#" class="flex items-center px-3 py-2 rounded text-gray-200 hover:bg-gray-700 tab-link" data-tab="analyzer">
<i class="fas fa-chart-bar mr-2"></i> SEO Analyzer
</a>
</li>
</ul>
</div>
<div class="mb-6">
<h3 class="text-sm font-semibold text-gray-400 uppercase tracking-wider mb-2">Utilities</h3>
<ul>
<li class="mb-1">
<a href="#" class="flex items-center px-3 py-2 rounded text-gray-200 hover:bg-gray-700 tab-link" data-tab="proxy">
<i class="fas fa-globe mr-2"></i> Proxy Manager
</a>
</li>
<li class="mb-1">
<a href="#" class="flex items-center px-3 py-2 rounded text-gray-200 hover:bg-gray-700 tab-link" data-tab="tools">
<i class="fas fa-tools mr-2"></i> SEO Tools
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="p-4 border-t border-gray-700">
<div class="text-xs text-gray-400 mb-2">System Status</div>
<div class="flex items-center mb-1">
<div class="w-2 h-2 rounded-full bg-green-500 mr-2"></div>
<span class="text-xs">Proxy: Active (12/50)</span>
</div>
<div class="flex items-center">
<div class="w-2 h-2 rounded-full bg-green-500 mr-2"></div>
<span class="text-xs">Threads: 10</span>
</div>
</div>
</div>
<!-- Main Content -->
<div class="flex-1 flex flex-col overflow-hidden">
<!-- Top Bar -->
<div class="bg-white border-b border-gray-200 p-4 flex items-center justify-between">
<div class="flex items-center">
<button id="sidebarToggle" class="mr-4 text-gray-600 hover:text-gray-900">
<i class="fas fa-bars"></i>
</button>
<h2 class="text-lg font-semibold">URL Harvester</h2>
</div>
<div class="flex items-center space-x-4">
<button class="px-3 py-1 bg-blue-600 text-white rounded hover:bg-blue-700 text-sm flex items-center">
<i class="fas fa-play mr-1"></i> Start
</button>
<button class="px-3 py-1 bg-gray-200 text-gray-700 rounded hover:bg-gray-300 text-sm flex items-center">
<i class="fas fa-stop mr-1"></i> Stop
</button>
<div class="relative">
<button class="px-3 py-1 bg-gray-200 text-gray-700 rounded hover:bg-gray-300 text-sm flex items-center">
<i class="fas fa-cog mr-1"></i> Settings
</button>
</div>
</div>
</div>
<!-- Tab Content -->
<div class="flex-1 overflow-auto p-6 bg-gray-100">
<!-- URL Harvester Tab -->
<div id="harvester" class="tab-content active">
<div class="bg-white rounded-lg shadow p-6 mb-6">
<h3 class="text-lg font-semibold mb-4">Search Parameters</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Keywords</label>
<textarea class="w-full border border-gray-300 rounded p-2 h-32" placeholder="Enter keywords, one per line"></textarea>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Search Engines</label>
<div class="space-y-2">
<label class="flex items-center">
<input type="checkbox" class="form-checkbox" checked>
<span class="ml-2">Google</span>
</label>
<label class="flex items-center">
<input type="checkbox" class="form-checkbox">
<span class="ml-2">Bing</span>
</label>
<label class="flex items-center">
<input type="checkbox" class="form-checkbox">
<span class="ml-2">Yahoo</span>
</label>
<label class="flex items-center">
<input type="checkbox" class="form-checkbox">
<span class="ml-2">Yandex</span>
</label>
</div>
<div class="mt-4">
<label class="block text-sm font-medium text-gray-700 mb-1">Results per Keyword</label>
<input type="number" value="100" class="w-20 border border-gray-300 rounded p-2">
</div>
</div>
</div>
<div class="mt-6 grid grid-cols-1 md:grid-cols-3 gap-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Country</label>
<select class="w-full border border-gray-300 rounded p-2">
<option>All Countries</option>
<option>United States</option>
<option>United Kingdom</option>
<option>Canada</option>
<option>Australia</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Language</label>
<select class="w-full border border-gray-300 rounded p-2">
<option>English</option>
<option>Spanish</option>
<option>French</option>
<option>German</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Threads</label>
<input type="range" min="1" max="20" value="10" class="w-full">
<div class="text-center text-sm">10 threads</div>
</div>
</div>
</div>
<div class="bg-white rounded-lg shadow p-6">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-semibold">Results</h3>
<div class="flex space-x-2">
<button class="px-3 py-1 bg-gray-200 text-gray-700 rounded hover:bg-gray-300 text-sm flex items-center">
<i class="fas fa-filter mr-1"></i> Filter
</button>
<button class="px-3 py-1 bg-gray-200 text-gray-700 rounded hover:bg-gray-300 text-sm flex items-center">
<i class="fas fa-save mr-1"></i> Export
</button>
</div>
</div>
<div class="mb-4">
<div class="flex justify-between text-sm text-gray-600 mb-1">
<span>Progress: 23%</span>
<span>Found: 1,245 URLs</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2.5">
<div class="progress-bar bg-blue-600 h-2.5 rounded-full" style="width: 23%"></div>
</div>
</div>
<div class="overflow-x-auto custom-scrollbar" style="max-height: 400px;">
<table id="resultsTable" class="min-w-full divide-y divide-gray-200">
<thead>
<tr>
<th class="px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">URL</th>
<th class="px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Title</th>
<th class="px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">PR</th>
<th class="px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Backlinks</th>
<th class="px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Source</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<!-- Sample data rows -->
<tr>
<td class="px-4 py-2 whitespace-nowrap text-sm text-blue-600">https://example.com</td>
<td class="px-4 py-2 whitespace-nowrap text-sm">Example Domain</td>
<td class="px-4 py-2 whitespace-nowrap text-sm text-center">3</td>
<td class="px-4 py-2 whitespace-nowrap text-sm text-center">1,245</td>
<td class="px-4 py-2 whitespace-nowrap text-sm">Google</td>
</tr>
<tr>
<td class="px-4 py-2 whitespace-nowrap text-sm text-blue-600">https://test.org</td>
<td class="px-4 py-2 whitespace-nowrap text-sm">Test Organization</td>
<td class="px-4 py-2 whitespace-nowrap text-sm text-center">2</td>
<td class="px-4 py-2 whitespace-nowrap text-sm text-center">876</td>
<td class="px-4 py-2 whitespace-nowrap text-sm">Bing</td>
</tr>
<!-- More rows would be added dynamically -->
</tbody>
</table>
</div>
</div>
</div>
<!-- Link Checker Tab -->
<div id="checker" class="tab-content">
<div class="bg-white rounded-lg shadow p-6">
<h3 class="text-lg font-semibold mb-4">Link Checker</h3>
<div class="mb-6">
<label class="block text-sm font-medium text-gray-700 mb-1">URLs to Check</label>
<textarea class="w-full border border-gray-300 rounded p-2 h-32" placeholder="Enter URLs to check, one per line"></textarea>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Check Type</label>
<select class="w-full border border-gray-300 rounded p-2">
<option>HTTP Status</option>
<option>PageRank</option>
<option>Alexa Rank</option>
<option>All Metrics</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Timeout (ms)</label>
<input type="number" value="5000" class="w-full border border-gray-300 rounded p-2">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Threads</label>
<input type="range" min="1" max="20" value="5" class="w-full">
<div class="text-center text-sm">5 threads</div>
</div>
</div>
<div class="flex space-x-4">
<button class="px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 flex items-center">
<i class="fas fa-play mr-2"></i> Start Checking
</button>
<button class="px-4 py-2 bg-gray-200 text-gray-700 rounded hover:bg-gray-300 flex items-center">
<i class="fas fa-stop mr-2"></i> Stop
</button>
</div>
</div>
</div>
<!-- Content Scraper Tab -->
<div id="scraper" class="tab-content">
<div class="bg-white rounded-lg shadow p-6">
<h3 class="text-lg font-semibold mb-4">Content Scraper</h3>
<div class="mb-6">
<label class="block text-sm font-medium text-gray-700 mb-1">URLs to Scrape</label>
<textarea class="w-full border border-gray-300 rounded p-2 h-32" placeholder="Enter URLs to scrape, one per line"></textarea>
</div>
<div class="mb-6">
<label class="block text-sm font-medium text-gray-700 mb-2">Data to Extract</label>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
<label class="flex items-center">
<input type="checkbox" class="form-checkbox" checked>
<span class="ml-2">Page Title</span>
</label>
<label class="flex items-center">
<input type="checkbox" class="form-checkbox" checked>
<span class="ml-2">Meta Description</span>
</label>
<label class="flex items-center">
<input type="checkbox" class="form-checkbox">
<span class="ml-2">H1 Tags</span>
</label>
<label class="flex items-center">
<input type="checkbox" class="form-checkbox">
<span class="ml-2">All Headers</span>
</label>
<label class="flex items-center">
<input type="checkbox" class="form-checkbox">
<span class="ml-2">Body Text</span>
</label>
<label class="flex items-center">
<input type="checkbox" class="form-checkbox">
<span class="ml-2">Images</span>
</label>
</div>
</div>
<div class="flex space-x-4">
<button class="px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 flex items-center">
<i class="fas fa-play mr-2"></i> Start Scraping
</button>
<button class="px-4 py-2 bg-gray-200 text-gray-700 rounded hover:bg-gray-300 flex items-center">
<i class="fas fa-stop mr-2"></i> Stop
</button>
</div>
</div>
</div>
<!-- Proxy Manager Tab -->
<div id="proxy" class="tab-content">
<div class="bg-white rounded-lg shadow p-6">
<h3 class="text-lg font-semibold mb-4">Proxy Manager</h3>
<div class="mb-6">
<label class="block text-sm font-medium text-gray-700 mb-1">Proxy List</label>
<textarea class="w-full border border-gray-300 rounded p-2 h-32" placeholder="Enter proxies in format IP:PORT:USERNAME:PASSWORD (one per line)"></textarea>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Proxy Type</label>
<select class="w-full border border-gray-300 rounded p-2">
<option>HTTP</option>
<option>HTTPS</option>
<option>SOCKS4</option>
<option>SOCKS5</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Test URL</label>
<input type="text" value="https://google.com" class="w-full border border-gray-300 rounded p-2">
</div>
</div>
<div class="flex space-x-4">
<button class="px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 flex items-center">
<i class="fas fa-check mr-2"></i> Test Proxies
</button>
<button class="px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700 flex items-center">
<i class="fas fa-plus mr-2"></i> Import
</button>
<button class="px-4 py-2 bg-red-600 text-white rounded hover:bg-red-700 flex items-center">
<i class="fas fa-trash mr-2"></i> Clear
</button>
</div>
<div class="mt-6">
<h4 class="text-md font-medium mb-2">Active Proxies</h4>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead>
<tr>
<th class="px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Proxy</th>
<th class="px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
<th class="px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Speed</th>
<th class="px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Last Used</th>
</tr>
</thead>
<tbody>
<tr>
<td class="px-4 py-2 whitespace-nowrap text-sm">192.168.1.1:8080</td>
<td class="px-4 py-2 whitespace-nowrap text-sm"><span class="px-2 py-1 bg-green-100 text-green-800 rounded-full text-xs">Working</span></td>
<td class="px-4 py-2 whitespace-nowrap text-sm">1.2s</td>
<td class="px-4 py-2 whitespace-nowrap text-sm">2 min ago</td>
</tr>
<tr>
<td class="px-4 py-2 whitespace-nowrap text-sm">10.0.0.1:3128</td>
<td class="px-4 py-2 whitespace-nowrap text-sm"><span class="px-2 py-1 bg-red-100 text-red-800 rounded-full text-xs">Failed</span></td>
<td class="px-4 py-2 whitespace-nowrap text-sm">Timeout</td>
<td class="px-4 py-2 whitespace-nowrap text-sm">5 min ago</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- SEO Tools Tab -->
<div id="tools" class="tab-content">
<div class="bg-white rounded-lg shadow p-6">
<h3 class="text-lg font-semibold mb-4">SEO Tools</h3>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
<div class="border border-gray-200 rounded-lg p-4 hover:shadow-md transition-shadow">
<div class="flex items-center mb-3">
<div class="bg-blue-100 p-3 rounded-full mr-3">
<i class="fas fa-link text-blue-600"></i>
</div>
<h4 class="font-medium">Backlink Checker</h4>
</div>
<p class="text-sm text-gray-600 mb-3">Check backlinks for any URL and analyze referring domains.</p>
<button class="text-sm text-blue-600 hover:text-blue-800">Open Tool</button>
</div>
<div class="border border-gray-200 rounded-lg p-4 hover:shadow-md transition-shadow">
<div class="flex items-center mb-3">
<div class="bg-green-100 p-3 rounded-full mr-3">
<i class="fas fa-key text-green-600"></i>
</div>
<h4 class="font-medium">Keyword Research</h4>
</div>
<p class="text-sm text-gray-600 mb-3">Find related keywords and analyze search volume trends.</p>
<button class="text-sm text-blue-600 hover:text-blue-800">Open Tool</button>
</div>
<div class="border border-gray-200 rounded-lg p-4 hover:shadow-md transition-shadow">
<div class="flex items-center mb-3">
<div class="bg-purple-100 p-3 rounded-full mr-3">
<i class="fas fa-chart-line text-purple-600"></i>
</div>
<h4 class="font-medium">Rank Tracker</h4>
</div>
<p class="text-sm text-gray-600 mb-3">Track your keyword rankings across search engines.</p>
<button class="text-sm text-blue-600 hover:text-blue-800">Open Tool</button>
</div>
<div class="border border-gray-200 rounded-lg p-4 hover:shadow-md transition-shadow">
<div class="flex items-center mb-3">
<div class="bg-yellow-100 p-3 rounded-full mr-3">
<i class="fas fa-file-alt text-yellow-600"></i>
</div>
<h4 class="font-medium">Content Analyzer</h4>
</div>
<p class="text-sm text-gray-600 mb-3">Analyze content for SEO factors and readability.</p>
<button class="text-sm text-blue-600 hover:text-blue-800">Open Tool</button>
</div>
<div class="border border-gray-200 rounded-lg p-4 hover:shadow-md transition-shadow">
<div class="flex items-center mb-3">
<div class="bg-red-100 p-3 rounded-full mr-3">
<i class="fas fa-bug text-red-600"></i>
</div>
<h4 class="font-medium">Site Audit</h4>
</div>
<p class="text-sm text-gray-600 mb-3">Crawl your website and identify SEO issues.</p>
<button class="text-sm text-blue-600 hover:text-blue-800">Open Tool</button>
</div>
<div class="border border-gray-200 rounded-lg p-4 hover:shadow-md transition-shadow">
<div class="flex items-center mb-3">
<div class="bg-indigo-100 p-3 rounded-full mr-3">
<i class="fas fa-sitemap text-indigo-600"></i>
</div>
<h4 class="font-medium">Sitemap Generator</h4>
</div>
<p class="text-sm text-gray-600 mb-3">Generate XML sitemaps for your website.</p>
<button class="text-sm text-blue-600 hover:text-blue-800">Open Tool</button>
</div>
</div>
</div>
</div>
<!-- SEO Analyzer Tab -->
<div id="analyzer" class="tab-content">
<div class="bg-white rounded-lg shadow p-6">
<h3 class="text-lg font-semibold mb-4">SEO Analyzer</h3>
<div class="mb-6">
<label class="block text-sm font-medium text-gray-700 mb-1">URL to Analyze</label>
<div class="flex">
<input type="text" placeholder="https://example.com" class="flex-1 border border-gray-300 rounded-l p-2">
<button class="px-4 py-2 bg-blue-600 text-white rounded-r hover:bg-blue-700">
Analyze
</button>
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
<div class="border border-gray-200 rounded-lg p-4">
<h4 class="font-medium mb-3 text-center">On-Page SEO</h4>
<div class="space-y-3">
<div class="flex justify-between items-center">
<span class="text-sm">Title Tag</span>
<span class="px-2 py-1 bg-green-100 text-green-800 rounded-full text-xs">Good</span>
</div>
<div class="flex justify-between items-center">
<span class="text-sm">Meta Description</span>
<span class="px-2 py-1 bg-yellow-100 text-yellow-800 rounded-full text-xs">Fair</span>
</div>
<div class="flex justify-between items-center">
<span class="text-sm">Header Tags</span>
<span class="px-2 py-1 bg-green-100 text-green-800 rounded-full text-xs">Good</span>
</div>
<div class="flex justify-between items-center">
<span class="text-sm">Image Alt Text</span>
<span class="px-2 py-1 bg-red-100 text-red-800 rounded-full text-xs">Poor</span>
</div>
</div>
</div>
<div class="border border-gray-200 rounded-lg p-4">
<h4 class="font-medium mb-3 text-center">Performance</h4>
<div class="space-y-3">
<div class="flex justify-between items-center">
<span class="text-sm">Page Speed</span>
<span class="px-2 py-1 bg-yellow-100 text-yellow-800 rounded-full text-xs">2.8s</span>
</div>
<div class="flex justify-between items-center">
<span class="text-sm">Mobile Friendly</span>
<span class="px-2 py-1 bg-green-100 text-green-800 rounded-full text-xs">Yes</span>
</div>
<div class="flex justify-between items-center">
<span class="text-sm">SSL Certificate</span>
<span class="px-2 py-1 bg-green-100 text-green-800 rounded-full text-xs">Valid</span>
</div>
</div>
</div>
<div class="border border-gray-200 rounded-lg p-4">
<h4 class="font-medium mb-3 text-center">Content</h4>
<div class="space-y-3">
<div class="flex justify-between items-center">
<span class="text-sm">Word Count</span>
<span class="text-sm font-medium">1,245</span>
</div>
<div class="flex justify-between items-center">
<span class="text-sm">Readability</span>
<span class="px-2 py-1 bg-green-100 text-green-800 rounded-full text-xs">Easy</span>
</div>
<div class="flex justify-between items-center">
<span class="text-sm">Keyword Density</span>
<span class="px-2 py-1 bg-yellow-100 text-yellow-800 rounded-full text-xs">2.1%</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Status Bar -->
<div class="bg-gray-800 text-gray-200 p-2 text-sm flex justify-between items-center">
<div>
<span class="mr-4">Status: <span class="text-green-400">Ready</span></span>
<span>URLs Processed: <span class="font-medium">1,245</span></span>
</div>
<div>
<span class="mr-4">Memory: <span class="font-medium">1.2GB</span></span>
<span>Time: <span class="font-medium">00:12:45</span></span>
</div>
</div>
</div>
</div>
<script>
// Toggle sidebar
document.getElementById('sidebarToggle').addEventListener('click', function() {
document.querySelector('.sidebar').classList.toggle('w-64');
document.querySelector('.sidebar').classList.toggle('w-16');
// Hide text when sidebar is collapsed
const sidebarTexts = document.querySelectorAll('.sidebar span, .sidebar h3, .sidebar h1, .sidebar p');
sidebarTexts.forEach(el => {
el.classList.toggle('hidden');
});
// Center icons when sidebar is collapsed
const sidebarIcons = document.querySelectorAll('.sidebar i');
sidebarIcons.forEach(icon => {
icon.classList.toggle('mx-auto');
icon.classList.toggle('mr-2');
});
// Adjust links padding
const sidebarLinks = document.querySelectorAll('.sidebar a');
sidebarLinks.forEach(link => {
link.classList.toggle('px-3');
link.classList.toggle('px-4');
link.classList.toggle('justify-start');
link.classList.toggle('justify-center');
});
});
// Tab switching
const tabLinks = document.querySelectorAll('.tab-link');
const tabContents = document.querySelectorAll('.tab-content');
tabLinks.forEach(link => {
link.addEventListener('click', function(e) {
e.preventDefault();
// Remove active class from all tabs and contents
tabLinks.forEach(l => l.classList.remove('active'));
tabContents.forEach(c => c.classList.remove('active'));
// Add active class to clicked tab
this.classList.add('active');
// Show corresponding content
const tabId = this.getAttribute('data-tab');
document.getElementById(tabId).classList.add('active');
// Update main header text
const tabText = this.textContent.trim();
document.querySelector('.flex-1 h2').textContent = tabText;
});
});
// Simulate progress bar animation
function simulateProgress() {
const progressBar = document.querySelector('.progress-bar');
let width = 23;
const interval = setInterval(() => {
if (width >= 100) {
clearInterval(interval);
return;
}
width += Math.random() * 5;
if (width > 100) width = 100;
progressBar.style.width = width + '%';
// Update progress text
document.querySelector('.flex.justify-between.text-sm span:first-child').textContent = `Progress: ${Math.floor(width)}%`;
}, 1000);
}
// Start simulation when Start button is clicked
document.querySelector('.bg-blue-600').addEventListener('click', simulateProgress);
// Stop simulation when Stop button is clicked
document.querySelector('.bg-gray-200').addEventListener('click', function() {
// In a real app, this would stop the actual process
document.querySelector('.flex-1 h2').textContent = 'Process Stopped';
});
// Add sample data to table (simulating scraping results)
function addSampleData() {
const table = document.getElementById('resultsTable').getElementsByTagName('tbody')[0];
const sampleUrls = [
{url: "https://sample.org", title: "Sample Organization", pr: 4, backlinks: 3421, source: "Google"},
{url: "https://demo.net", title: "Demo Website", pr: 2, backlinks: 876, source: "Bing"},
{url: "https://test-site.com", title: "Test Site", pr: 3, backlinks: 1543, source: "Google"},
{url: "https://web-scraping.io", title: "Web Scraping Resources", pr: 5, backlinks: 8921, source: "Yahoo"},
{url: "https://data-mining.edu", title: "Data Mining University", pr: 4, backlinks: 4321, source: "Google"}
];
sampleUrls.forEach(item => {
const row = table.insertRow();
row.innerHTML = `
<td class="px-4 py-2 whitespace-nowrap text-sm text-blue-600">${item.url}</td>
<td class="px-4 py-2 whitespace-nowrap text-sm">${item.title}</td>
<td class="px-4 py-2 whitespace-nowrap text-sm text-center">${item.pr}</td>
<td class="px-4 py-2 whitespace-nowrap text-sm text-center">${item.backlinks.toLocaleString()}</td>
<td class="px-4 py-2 whitespace-nowrap text-sm">${item.source}</td>
`;
});
}
// Call addSampleData after a delay to simulate loading
setTimeout(addSampleData, 1500);
</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=tjksecurity/webscraper" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>