File size: 5,572 Bytes
282fee0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5929a77
282fee0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5929a77
282fee0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<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>