YouTube Video Downloader
About this app
A simple web app to download YouTube videos in the highest quality
YouTube Video Downloader YouTube Video Downloader Download
Related apps
Put this on your site
Source
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>YouTube Video Downloader</title>
<meta name="description" content="A simple web app to download YouTube videos in the highest quality">
<meta name="keywords" content="YouTube, video, download, highest quality">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script type="text/javascript">
try {
// App Javascript Goes Here. Place your entire script content inside the try block for error handling.
// This will run when the DOM is ready.
document.addEventListener("DOMContentLoaded", function() {
$('#download-button').click(function() {
var url = $('#youtube-url').val();
var videoId = getVideoId(url);
var downloadUrl = 'https://www.youtube.com/watch?v=' + videoId;
window.open(downloadUrl, '_blank');
});
});
// Function to extract video ID from YouTube URL
function getVideoId(url) {
var videoId = '';
var regex = /[?&]([^=#]+)=([^&#]*)/g;
var match;
while (match = regex.exec(url)) {
if (match[1] === 'v') {
videoId = match[2];
break;
}
}
return videoId;
}
} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>
<style>
/* App CSS Goes Here */
body {
background-color: #f5f5f5;
font-family: 'Roboto', sans-serif;
}
.container {
max-width: 600px;
margin: 0 auto;
padding: 20px;
text-align: center;
}
h1 {
color: #333;
margin-bottom: 20px;
}
.form-group {
margin-bottom: 20px;
}
#download-button {
width: 100%;
background-color: #ff0000;
border: none;
color: #fff;
padding: 10px;
font-size: 16px;
cursor: pointer;
transition: background-color 0.3s;
}
#download-button:hover {
background-color: #cc0000;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<h1>YouTube Video Downloader</h1>
<div class="form-group">
<input type="text" id="youtube-url" class="form-control" placeholder="Enter YouTube URL">
</div>
<button id="download-button" class="btn btn-primary">Download</button>
</div>
</body>
</html>
NEW APPS
These are apps made by the community!