Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Web Scraper Pro - Extract Content from URLs</title> | |
| <link rel="stylesheet" href="style.css"> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| <script> | |
| tailwind.config = { | |
| theme: { | |
| extend: { | |
| colors: { | |
| primary: '#3B82F6', | |
| secondary: '#10B981' | |
| } | |
| } | |
| } | |
| } | |
| </script> | |
| </head> | |
| <body class="bg-gray-50 min-h-screen flex flex-col"> | |
| <custom-navbar></custom-navbar> | |
| <main class="flex-1 container mx-auto px-4 py-8"> | |
| <!-- Hero Section --> | |
| <section class="text-center mb-12"> | |
| <h1 class="text-4xl md:text-6xl font-bold text-gray-900 mb-4"> | |
| Web Scraper Pro | |
| <span class="text-primary">🕷️</span> | |
| </h1> | |
| <p class="text-xl text-gray-600 max-w-2xl mx-auto"> | |
| Extract article content and images from any URL with our powerful web scraping tool | |
| </p> | |
| </section> | |
| <!-- Main Scraper Interface --> | |
| <section class="max-w-4xl mx-auto bg-white rounded-2xl shadow-xl p-8 mb-8"> | |
| <div class="flex items-center gap-3 mb-6"> | |
| <i data-feather="link" class="text-primary"></i> | |
| <h2 class="text-2xl font-bold text-gray-900">Enter URL to Scrape</h2> | |
| </div> | |
| <form id="scraperForm" class="space-y-6"> | |
| <div class="space-y-2"> | |
| <label for="urlInput" class="block text-sm font-medium text-gray-700"> | |
| Website URL | |
| </label> | |
| <input | |
| type="url" | |
| id="urlInput" | |
| placeholder="https://example.com/article" | |
| class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary focus:border-transparent transition-all duration-200" | |
| required | |
| > | |
| </div> | |
| <div class="flex gap-4"> | |
| <button | |
| type="submit" | |
| class="flex-1 bg-primary hover:bg-blue-600 text-white font-semibold py-3 px-6 rounded-lg transition-all duration-200 flex items-center justify-center gap-2" | |
| > | |
| <i data-feather="download" class="w-5 h-5"></i> | |
| Extract Content | |
| </button> | |
| <button | |
| type="button" | |
| onclick="clearResults()" | |
| class="px-6 py-3 border border-gray-300 text-gray-700 rounded-lg hover:bg-gray-50 transition-all duration-200" | |
| > | |
| Clear | |
| </button> | |
| </div> | |
| </form> | |
| </section> | |
| <!-- Loading State --> | |
| <div id="loading" class="hidden max-w-4xl mx-auto text-center p-8"> | |
| <div class="animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto mb-4"></div> | |
| <p class="text-gray-600">Extracting content from website...</p> | |
| </div> | |
| <!-- Results Section --> | |
| <section id="results" class="hidden max-w-4xl mx-auto"> | |
| <!-- Article Content --> | |
| <div class="bg-white rounded-2xl shadow-xl p-8 mb-6"> | |
| <div class="flex items-center gap-3 mb-6"> | |
| <i data-feather="file-text" class="text-primary"></i> | |
| <h2 class="text-2xl font-bold text-gray-900">Extracted Content</h2> | |
| </div> | |
| <div id="articleContent" class="prose max-w-none text-gray-700"> | |
| <!-- Content will be inserted here --> | |
| </div> | |
| </div> | |
| <!-- Images Gallery --> | |
| <div class="bg-white rounded-2xl shadow-xl p-8"> | |
| <div class="flex items-center gap-3 mb-6"> | |
| <i data-feather="image" class="text-primary"></i> | |
| <h2 class="text-2xl font-bold text-gray-900">Extracted Images</h2> | |
| </div> | |
| <div id="imageGallery" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"> | |
| <!-- Images will be inserted here --> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Error Message --> | |
| <div id="error" class="hidden max-w-4xl mx-auto bg-red-50 border border-red-200 rounded-2xl p-6 mb-6"> | |
| <div class="flex items-center gap-3 text-red-800"> | |
| <i data-feather="alert-triangle" class="w-6 h-6"></i> | |
| <h3 class="font-semibold">Error</h3> | |
| </div> | |
| <p id="errorMessage" class="text-red-700 mt-2"></p> | |
| </div> | |
| </main> | |
| <custom-footer></custom-footer> | |
| <!-- Component Scripts --> | |
| <script src="components/navbar.js"></script> | |
| <script src="components/footer.js"></script> | |
| <!-- Main Script --> | |
| <script src="script.js"></script> | |
| <!-- Feather Icons --> | |
| <script> | |
| feather.replace(); | |
| </script> | |
| <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script> | |
| </body> | |
| </html> |