File size: 11,321 Bytes
3c0c84b |
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 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Universal Video Downloader</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>
.gradient-bg {
background: linear-gradient(135deg, #6e8efb, #a777e3);
}
.video-preview {
transition: all 0.3s ease;
}
.video-preview:hover {
transform: translateY(-5px);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.pulse-animation {
animation: pulse 2s infinite;
}
@keyframes pulse {
0% {
transform: scale(1);
}
50% {
transform: scale(1.05);
}
100% {
transform: scale(1);
}
}
</style>
</head>
<body class="min-h-screen bg-gray-100">
<div class="gradient-bg text-white py-8 px-4 shadow-lg">
<div class="container mx-auto max-w-4xl">
<div class="flex items-center justify-between">
<div>
<h1 class="text-3xl font-bold"><i class="fas fa-video mr-3"></i>Universal Video Downloader</h1>
<p class="mt-2 opacity-90">Download videos from any website with one click</p>
</div>
<div class="w-16 h-16 bg-white bg-opacity-20 rounded-full flex items-center justify-center">
<i class="fas fa-download text-3xl"></i>
</div>
</div>
</div>
</div>
<div class="container mx-auto max-w-4xl px-4 py-8">
<div class="bg-white rounded-xl shadow-lg p-6 mb-8">
<div class="flex flex-col md:flex-row gap-4">
<input
type="url"
id="videoUrl"
placeholder="Paste video URL here (e.g. YouTube, Vimeo, etc.)"
class="flex-grow px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500"
>
<button
id="fetchBtn"
class="px-6 py-3 bg-purple-600 text-white rounded-lg hover:bg-purple-700 transition-colors flex items-center justify-center gap-2"
>
<i class="fas fa-search"></i> Find Videos
</button>
</div>
<div class="mt-4 text-sm text-gray-500 flex items-center">
<i class="fas fa-info-circle mr-2"></i>
Works with most video hosting platforms including YouTube, Vimeo, Dailymotion, etc.
</div>
</div>
<div id="loading" class="hidden text-center py-12">
<div class="inline-block p-6 bg-white rounded-full shadow-lg pulse-animation">
<i class="fas fa-spinner fa-spin text-4xl text-purple-600"></i>
</div>
<p class="mt-4 text-gray-600">Scanning the webpage for videos...</p>
</div>
<div id="error" class="hidden bg-red-100 border-l-4 border-red-500 text-red-700 p-4 mb-8 rounded">
<div class="flex items-center">
<i class="fas fa-exclamation-circle mr-3 text-xl"></i>
<p id="error-message"></p>
</div>
</div>
<div id="results" class="hidden">
<h2 class="text-2xl font-semibold mb-6 text-gray-800 flex items-center">
<i class="fas fa-film mr-3 text-purple-600"></i> Found Videos
</h2>
<div id="videoList" class="grid grid-cols-1 md:grid-cols-2 gap-6">
<!-- Videos will be added here dynamically -->
</div>
</div>
<div id="instructions" class="mt-12 bg-blue-50 border-l-4 border-blue-500 text-blue-800 p-4 rounded-lg">
<h3 class="font-bold text-lg mb-2 flex items-center">
<i class="fas fa-question-circle mr-2"></i> How to use
</h3>
<ol class="list-decimal pl-5 space-y-2">
<li>Copy the URL of any webpage containing video(s)</li>
<li>Paste it in the input field above</li>
<li>Click "Find Videos" to scan the page</li>
<li>Select your preferred quality and download</li>
</ol>
</div>
</div>
<footer class="bg-gray-800 text-white py-6 mt-12">
<div class="container mx-auto max-w-4xl px-4 text-center">
<p>© 2023 Universal Video Downloader. For educational purposes only.</p>
<p class="mt-2 text-sm text-gray-400">Respect copyright laws and only download videos you have permission to.</p>
</div>
</footer>
<script>
document.addEventListener('DOMContentLoaded', function() {
const videoUrl = document.getElementById('videoUrl');
const fetchBtn = document.getElementById('fetchBtn');
const loading = document.getElementById('loading');
const error = document.getElementById('error');
const errorMessage = document.getElementById('error-message');
const results = document.getElementById('results');
const videoList = document.getElementById('videoList');
// Mock video data for demonstration
const mockVideos = [
{
title: "Sample Video 1",
thumbnail: "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg",
duration: "4:32",
qualities: [
{ resolution: "1080p", size: "45MB", url: "#" },
{ resolution: "720p", size: "28MB", url: "#" },
{ resolution: "480p", size: "15MB", url: "#" }
]
},
{
title: "Sample Video 2",
thumbnail: "https://i.ytimg.com/vi/9bZkp7q19f0/hqdefault.jpg",
duration: "3:45",
qualities: [
{ resolution: "720p", size: "32MB", url: "#" },
{ resolution: "480p", size: "18MB", url: "#" }
]
}
];
fetchBtn.addEventListener('click', function() {
const url = videoUrl.value.trim();
if (!url) {
showError("Please enter a valid URL");
return;
}
// Validate URL format
try {
new URL(url);
} catch (e) {
showError("Please enter a valid URL format (e.g. https://example.com)");
return;
}
// Show loading state
loading.classList.remove('hidden');
error.classList.add('hidden');
results.classList.add('hidden');
// Simulate API call with timeout
setTimeout(() => {
loading.classList.add('hidden');
// For demo purposes, we'll use mock data
// In a real app, you would call your backend service here
// that would scrape the URL and find videos
if (url.includes('error')) {
showError("Could not find any videos at this URL. Try another one.");
} else {
displayVideos(mockVideos);
}
}, 2000);
});
function showError(message) {
errorMessage.textContent = message;
error.classList.remove('hidden');
}
function displayVideos(videos) {
videoList.innerHTML = '';
if (videos.length === 0) {
showError("No videos found at this URL");
return;
}
videos.forEach(video => {
const videoCard = document.createElement('div');
videoCard.className = 'bg-white rounded-xl overflow-hidden shadow-md video-preview';
videoCard.innerHTML = `
<div class="relative">
<img src="${video.thumbnail}" alt="${video.title}" class="w-full h-48 object-cover">
<span class="absolute bottom-2 right-2 bg-black bg-opacity-70 text-white px-2 py-1 text-sm rounded">
${video.duration}
</span>
</div>
<div class="p-4">
<h3 class="font-semibold text-lg mb-2 truncate">${video.title}</h3>
<div class="space-y-2">
${video.qualities.map(quality => `
<div class="flex items-center justify-between bg-gray-50 p-2 rounded">
<div>
<span class="font-medium">${quality.resolution}</span>
<span class="text-sm text-gray-500 ml-2">${quality.size}</span>
</div>
<a href="${quality.url}" class="px-3 py-1 bg-purple-600 text-white text-sm rounded hover:bg-purple-700 transition-colors flex items-center">
<i class="fas fa-download mr-1"></i> Download
</a>
</div>
`).join('')}
</div>
</div>
`;
videoList.appendChild(videoCard);
});
results.classList.remove('hidden');
}
// Demo: Auto-fill URL on click for testing
videoUrl.addEventListener('click', function() {
if (!this.value) {
this.value = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ';
}
});
});
</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=C50BARZ/yt" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |