Spaces:
Sleeping
Sleeping
File size: 27,852 Bytes
b10e9c4 |
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 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 |
<!DOCTYPE html>
<html lang="vi">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Video Downloader Online - yt-dlp API</title>
<script src="https://cdn.tailwindcss.com"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
body { font-family: 'Inter', sans-serif; }
.gradient-bg {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.glass-effect {
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.2);
}
.preview-placeholder {
background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
background-size: 20px 20px;
background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}
.spinner {
animation: spin 1s linear infinite;
}
@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
</style>
</head>
<body class="gradient-bg min-h-screen">
<!-- API Status Indicator -->
<div id="apiStatus" class="fixed top-4 right-4 z-50"></div>
<div class="container mx-auto px-4 py-8">
<!-- Header -->
<div class="text-center mb-12">
<h1 class="text-5xl font-bold text-white mb-4">
🎬 Video Downloader
</h1>
<p class="text-xl text-white/80 max-w-2xl mx-auto">
Tải video từ YouTube và các trang web khác sử dụng yt-dlp API
</p>
</div>
<!-- Main Content -->
<div class="max-w-6xl mx-auto">
<div class="grid lg:grid-cols-2 gap-8">
<!-- Input Section -->
<div class="glass-effect rounded-2xl p-8">
<h2 class="text-2xl font-semibold text-white mb-6 flex items-center">
📥 Nhập Liên Kết
</h2>
<div class="space-y-6">
<div>
<label class="block text-white/90 text-sm font-medium mb-3">
URL Video
</label>
<input
type="url"
id="videoUrl"
placeholder="https://www.youtube.com/watch?v=dQw4w9WgXcQ"
value="https://www.youtube.com/watch?v=dQw4w9WgXcQ"
class="w-full px-4 py-3 rounded-xl bg-white/10 border border-white/20 text-white placeholder-white/50 focus:outline-none focus:ring-2 focus:ring-blue-400 focus:border-transparent transition-all"
>
</div>
<div>
<label class="block text-white/90 text-sm font-medium mb-3">
Chất Lượng
</label>
<select id="qualitySelect" class="w-full px-4 py-3 rounded-xl bg-white/10 border border-white/20 text-white focus:outline-none focus:ring-2 focus:ring-blue-400 focus:border-transparent transition-all">
<option value="best" class="bg-gray-800">Tốt nhất</option>
<option value="worst" class="bg-gray-800">Thấp nhất (nhanh hơn)</option>
<option value="720p" class="bg-gray-800">720p (HD)</option>
<option value="480p" class="bg-gray-800">480p (SD)</option>
<option value="360p" class="bg-gray-800">360p</option>
</select>
</div>
<div>
<label class="block text-white/90 text-sm font-medium mb-3">
Định Dạng
</label>
<div class="flex gap-3">
<label class="flex items-center cursor-pointer">
<input type="radio" name="format" value="video" checked class="sr-only">
<div class="w-5 h-5 rounded-full border-2 border-white/40 flex items-center justify-center mr-2">
<div class="w-2 h-2 rounded-full bg-blue-400"></div>
</div>
<span class="text-white/90">Video</span>
</label>
<label class="flex items-center cursor-pointer">
<input type="radio" name="format" value="audio" class="sr-only">
<div class="w-5 h-5 rounded-full border-2 border-white/40 flex items-center justify-center mr-2">
<div class="w-2 h-2 rounded-full bg-transparent"></div>
</div>
<span class="text-white/90">Audio MP3</span>
</label>
</div>
</div>
<div class="flex gap-3">
<button
onclick="getVideoInfo()"
class="flex-1 bg-gradient-to-r from-green-500 to-teal-600 hover:from-green-600 hover:to-teal-700 text-white font-semibold py-4 px-6 rounded-xl transition-all duration-300 transform hover:scale-105 shadow-lg"
>
🔍 Xem Thông Tin
</button>
<button
onclick="downloadVideo()"
class="flex-1 bg-gradient-to-r from-blue-500 to-purple-600 hover:from-blue-600 hover:to-purple-700 text-white font-semibold py-4 px-6 rounded-xl transition-all duration-300 transform hover:scale-105 shadow-lg"
>
🚀 Tải Xuống
</button>
</div>
</div>
</div>
<!-- Preview Section -->
<div class="glass-effect rounded-2xl p-8">
<h2 class="text-2xl font-semibold text-white mb-6 flex items-center">
👁️ Thông Tin Video
</h2>
<div id="previewContainer" class="space-y-4">
<div class="preview-placeholder rounded-xl h-48 flex items-center justify-center">
<div class="text-center text-gray-500">
<div class="text-4xl mb-2">🎥</div>
<p>Nhấn "Xem Thông Tin" để hiển thị chi tiết video</p>
</div>
</div>
<div class="bg-white/5 rounded-xl p-4">
<h3 id="videoTitle" class="text-white font-medium mb-2">Tiêu đề video sẽ hiển thị ở đây</h3>
<div class="flex justify-between text-sm text-white/70">
<span id="videoDuration">Thời lượng: --:--</span>
<span id="videoViews">Lượt xem: --</span>
</div>
<div class="mt-2 text-sm text-white/70">
<span id="videoUploader">Kênh: --</span>
</div>
</div>
</div>
</div>
</div>
<!-- Output Section -->
<div class="glass-effect rounded-2xl p-8 mt-8">
<h2 class="text-2xl font-semibold text-white mb-6 flex items-center">
📤 Kết Quả Tải Xuống
</h2>
<div id="outputContainer" class="space-y-4">
<div class="bg-white/5 rounded-xl p-6 text-center">
<div class="text-4xl mb-4">⏳</div>
<p class="text-white/70">Chưa có video nào được xử lý</p>
<p class="text-sm text-white/50 mt-2">Nhập URL và nhấn "Tải Xuống" để bắt đầu</p>
</div>
</div>
</div>
<!-- Downloaded Files Section -->
<div class="glass-effect rounded-2xl p-8 mt-8">
<div class="flex items-center justify-between mb-6">
<h2 class="text-2xl font-semibold text-white flex items-center">
📁 File Đã Tải
</h2>
<button
onclick="refreshDownloadsList()"
class="bg-white/10 hover:bg-white/20 text-white px-4 py-2 rounded-lg transition-colors text-sm"
>
🔄 Làm mới
</button>
</div>
<div id="downloadsContainer">
<div class="bg-white/5 rounded-xl p-6 text-center">
<div class="text-4xl mb-4">�</div>
<p class="text-white/70">Đang tải danh sách file...</p>
</div>
</div>
</div>
<!-- Supported Sites -->
<div class="glass-effect rounded-2xl p-8 mt-8">
<h2 class="text-2xl font-semibold text-white mb-6 text-center">
🌐 Trang Web Được Hỗ Trợ (yt-dlp)
</h2>
<div class="grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-4">
<div class="bg-white/10 rounded-lg p-4 text-center">
<div class="text-2xl mb-2">📺</div>
<span class="text-white/80 text-sm">YouTube</span>
</div>
<div class="bg-white/10 rounded-lg p-4 text-center">
<div class="text-2xl mb-2">📱</div>
<span class="text-white/80 text-sm">TikTok</span>
</div>
<div class="bg-white/10 rounded-lg p-4 text-center">
<div class="text-2xl mb-2">📘</div>
<span class="text-white/80 text-sm">Facebook</span>
</div>
<div class="bg-white/10 rounded-lg p-4 text-center">
<div class="text-2xl mb-2">📷</div>
<span class="text-white/80 text-sm">Instagram</span>
</div>
<div class="bg-white/10 rounded-lg p-4 text-center">
<div class="text-2xl mb-2">�</div>
<span class="text-white/80 text-sm">Twitter</span>
</div>
<div class="bg-white/10 rounded-lg p-4 text-center">
<div class="text-2xl mb-2">🎵</div>
<span class="text-white/80 text-sm">Vimeo</span>
</div>
</div>
<div class="text-center mt-4">
<p class="text-white/60 text-sm">và hàng nghìn trang web khác được hỗ trợ bởi yt-dlp</p>
</div>
</div>
</div>
</div>
<script>
</script>
</body>
</html>
|