Youtube Video Download Using Python Project Report
Youtube Video Download Using Python Project Report
net/publication/381010231
CITATIONS READS
0 599
1 author:
Kamal Acharya
Tribhuvan University
245 PUBLICATIONS 4,339 CITATIONS
SEE PROFILE
All content following this page was uploaded by Kamal Acharya on 31 May 2024.
INTERNSHIP REPORT
ON
YOUTUBE VIDEO DOWNLOAD USING PYTHON
PROJECT
BY
KAMAL ACHARYA
(Tribhuvan University)
Date: 2022/01/25
1|Page
INTRODUCTION
2|Page
1.1 PROJECT DESCRIPTION:
In order to form a clear sketch of this project, here's a brief introduction of the
features and scope of YouTube Video Downloader. This project consists of three modules which are
inter-linked to each other. Each of the above modules has certain specific task to perform. Tkinter is
the standard GUI library for Python. Python when combined with Tkinter provides a fast and easy way
to create GUI applications. Tkinter provides a powerful object- oriented interface to the Tk GUI toolkit.
Tkinter provides various controls, such as buttons, labels and text boxes used in a GUI application.
These controls are commonly called widgets.Pytube library makes the video downloading very easy.
Create the object of the YouTube module by passing the link as the parameter. Then, get the
appropriate extension and resolution of the video. You can set the name of the file as your convenience,
in another case original name will be kept. After that, download the file using the download function
which has one parameter which is the location where to download the file. Python, this task is very
easy. Few lines of code will download the video from YouTube for you.
Front-End: PYTHON
Back-End: PYTHON
OBJECTIVE:
3|Page
2. SYSTEM ANALYSIS
Online YouTube Video Downloaders: These are web-based tools that allow users to
download YouTube videos by simply pasting the video URL into the download box. Some popular
examples of online YouTube video downloaders include Y2Mate, Keep Vid , and Clip Converter.
Browser Extensions: There are various browser extensions available for Google Chrome, Mozilla
Firefox, and other web browsers that allow users to download YouTube videos with ease. Some
popular extensions include Video Download Helper and Fastest Tube. Desktop Software: There are
several desktop software options available that allow users to download YouTube videos to their
computer. Some popular software include 4K Video Downloader, Free YouTube Downloader, and
WinX YouTube Downloader.
1. Quality Loss.
2. Malware and Viruses.
3. Unreliable.
4. Limited Compatibility.
4|Page
2.2.1 ADVANTAGES OF PROPOSED SYSTEM
1. Legality and Ethics
2. Quality preservation
3. Reliability
4. User Interface
Platform : Windows10
Processor : AMD PRO A4-350B R4, 5 COMPUTE CORES2C +
3G
CPU Speed : 2.50 GHz
RAM : 4 GB
5|Page
Hard Disk : 210 GB
6|Page
2.3.3 SOFTWARE DESCRIPTION
Python is a popular programming language. It was created by Guido van Rossum. and released in
1991.Python was designed for readability, and has some similarities to the English language with
influence from mathematics. Python uses new lines to complete a command, as opposed to other
programming languages which often use semicolons or parentheses. Python relies on indentation,
using whitespace, to define scope; such as the scope of loops. functions and classes. Other
programming languages often use curly-brackets for this purpose.
Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc).
Python has syntax that allows developers to write programs with fewer lines than some other
programming languages.
Python runs on an interpreter system, meaning that code can be executed as soon as it is
written. This means thatprototyping can be very quick.
Python can be treated in a procedural way, an object- oriented way or a functional way.
FEATURES OF PYTHON:
Easy to Learn and Use: Python has a simple syntax and structure that makes it easy to learn and use,
even for beginners.
Interpreted: Python is an interpreted language, which means that it can execute code directly without
the need for compilation. This makes it easier to test and debug code.
Multi-Platform Support: Python code can be run on a wide range of platforms, including Windows,
Linux, and macOS.
7|Page
Large Standard Library: Python comes with a large standard library that includes modules for a wide
range of applications, from web development to scientific computing.
Third-Party Libraries and Frameworks: Python has a large and active community of developers who
contribute to open-source libraries and frameworks, making it easy to find resources and support for building
and maintaining Python applications.
8|Page
SYSTEM DESIGN AND
DEVELOPMENT
9|Page
3.1 SYSTEM DESIGN AND DEVELOPMENT
3.1 DATA FLOW DIAGRAM
START
Extract video ID
END
10 | P a g e
3.2 MODULE DESCRIPTION
The project having two categories there are
1. File
1. Downloader
2. Mode
3. Help
4. Exit
File
A file description refers to a summary or a detailed explanation of the content, purpose, and structure of
a file. It is often used to provide context and help users understand the contents
Downloader
A video downloader is a type of downloader software that is specifically designed to download video
content from websites
Mode
Light mode and dark mode are two different display modes available in software applications and
devices that allow users to switch between light and dark color schemes.
Help
Help is a type of assistance or support provided to individuals who are in need of guidance, information,
or instruction.
Exit
Exit is a command or action that allows a user to close or terminate a program, application, or system.
11 | P a g e
3.3 SYSTEM DESIGN
Definition
The most creative and challenging face of the system development is System Design. It
provides the understanding and procedural details necessary for the logical and physical stages of
development. In designing a new system, the system analyst must have a clear understanding of
the objectives, which the design is aiming to fulfill. The first step is to determine how the output
is to be produced and in what format. Second, input data and master files have to be designed to
meet the requirements of the proposed output. The operational phases are handled through program
construction and testing.
In this software, importance is given to develop Graphical User Interface (GUI), which is
an important factor in developing efficient and user friendly software. For inputting user data,
attractive forms are designed. User can also select the desired options from the menu, which
provides all possible facilities. Also the important input format is designed in such a way that
accidental errors are avoided. The user has to input only just the minimum data required, which
also helps in avoiding the errors that the users may make. Accurate designing of the input format
is very important in developing efficient software. The goal of input design is to make entry as
easy, logical and free from errors.
12 | P a g e
SAMPLE OUTPUT:
FILES:
ABOUT:
13 | P a g e
Light mode:
14 | P a g e
Contact us:
Gathering URL:
15 | P a g e
File Directory:
Video Fetching:
16 | P a g e
Path setting:
Downloader:
17 | P a g e
Exit:
18 | P a g e
3.6 Code Design
Asgi.py
"""
ASGI config for djangoProject project.
import os
19 | P a g e
from pathlib import
Pathimport os
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path( file ).resolve().parent.parent
ALLOWED_HOSTS = ['*']
# Application definition
INSTALLED_APPS = [
'ytdl',
'crispy_forms',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes'
, 'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
]
20 | P a g e
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
21 | P a g e
'whitenoise.middleware.WhiteNoiseMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
ROOT_URLCONF = 'djangoProject.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [BASE_DIR / 'templates']
,
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
WSGI_APPLICATION = 'djangoProject.wsgi.application'
# Database
# https://docs.djangoproject.com/en/3.1/ref/settings/#databases
DATABASES = {
'default':
22 | P a g e
'ENGINE': 'django.db.backends.sqlite3','NAME':
'test',
}
}
# Password validation
# https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
# Internationalization
#
https://docs.djangoproject.com/en/3.1/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
23 | P a g e
USE_L10N = True
USE_TZ = True
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static_serve', 'static_root')
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'static_serve', 'media_root')
CRISPY_TEMPLATE_PACK = 'bootstrap4'
# CORS_REPLACE_HTTPS_REFERER = False
# HOST_SCHEME = "http://"
# SECURE_PROXY_SSL_HEADER =
None# SECURE_SSL_REDIRECT = False
# SESSION_COOKIE_SECURE =
False# CSRF_COOKIE_SECURE = False
# SECURE_HSTS_SECONDS = None
# SECURE_HSTS_INCLUDE_SUBDOMAINS = False#
SECURE_FRAME_DENY = False
24 | P a g e
URL.py
"""djangoProject URL Configuration
The `urlpatterns` list routes URLs to views. For more information please
see:https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(),
name='home') Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/',
include('blog.urls')) """
from django.contrib import admin
from django.urls import path
from ytdl import views
urlpatterns = [
path('', views.download_video),
]
Wagi.py
"""
WSGI config for djangoProject project.
25 | P a g e
import os
Manage.py
#!/usr/bin/env python
"""Django's command-line utility for administrative
tasks."""import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangoProject.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)
26 | P a g e
VIEW.PY
from django.shortcuts import render
def download_video(request):
global context
form = DownloadForm(request.POST or None)
if form.is_valid():
video_url = form.cleaned_data.get("url")
regex =
r'^(http(s)?:\/\/)?((w){3}.)?youtu(be|.be)?(\.com)?\/.+'if not
re.match(regex,video_url):
return HttpResponse('Enter correct url.')
ydl_opts = {}
try:
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
meta = ydl.extract_info(
video_url,
download=False)
video_audio_streams = []
for m in meta['formats']:
file_size = m['filesize']
if file_size is not None:
file_size = f'{round(int(file_size) / 1000000,2)} mb'
resolution = 'Audio'
27 | P a g e
if m['height'] is not None:
resolution = f"{m['height']}x{m['width']}"
video_audio_streams.append({
'resolution':
resolution, 'extension':
m['ext'], 'file_size':
file_size, 'video_url':
m['url']
})
video_audio_streams = video_audio_streams[::-
1] context = {
'form': form,
'title': meta.get('title', None),
'streams': video_audio_streams,
'description':
meta.get('description'),
'likes': f'{int(meta.get("like_count", 0)):,}',
'dislikes': f'{int(meta.get("dislike_count", 0)):,}',
'thumb': meta.get('thumbnails')[3]['url'],
'duration': round(int(meta.get('duration', 1))/60,
2),'views': f'{int(meta.get("view_count")):,}'
}
return render(request, 'home.html',
context) except Exception as error:
return HttpResponse(error.args[0])
return render(request, 'home.html', {'form': form})
28 | P a g e
TESTING AND IMPLEMENTATION
29 | P a g e
4. TESTING AND IMPLEMENTATION
System testing is the state of implementation, which is aimed at ensuring that the System
Works accurate and efficient as expect before, live operation, commences. It certifies that the
whole set of programs hang together system testing requires a test plan, That consist f several key
activities and step for run program, string, system and user acceptance testing. the implementation
newly design package is important in adapting a successful new system
Testing phase development phase that validates the code against the functional
specification. testing is a vital the achievement the system goals the objective testing is to discover
errors, to fulfill this objective a series of test step such as the unit test , integration , validation and
system test where planned and executed.
UNIT TESTING
Unit testing are called module testing. The following modules have been tested
30 | P a g e
INTEGRATION TESTING
Following modules have been integrated for evaluating the efficiency of interface
The acceptance is the final stage of the user the various possibilities of the data are entered and
the result are tested.
VAILIDATION TESTING
Implementation is the final and important phase, the most critical stage in achieving a
successful new system and giving the user confidence. That the new system will work be effective
. The system can be implemented only after through testing is done and if it found to working
according to the specification
31 | P a g e
CONCLUSION
32 | P a g e
5. CONCLUSION
The project is an attempt to develop a system that can be used computerization of activities in the
company . Since these activities are tedious process lot of effort, more care has taken for the system
development the requirements a suitable database is created maximum effort were taken to avoid
duplication in data entry and data storage various report generated by this system
The major advantage of the system is fast accurate information retrieval minimization of clerical
work, easy and efficient data storage and report generation
A features that is required for the YOUTUBE VIDEO DOWNLOADER has been finished
successfully.
33 | P a g e
6. FUTURE ENHANCEMENTS
7. BIBLIOGRAPHY
7.2.1.1 https://www.tutorialspoint.com
7.2.1.2 https://www.w3schools.coM
7.2.1.3 https://www.youtube.com
7.2.1.4 www.visuastudio.com
34 | P a g e
Reference
Acharya, Kamal. "STUDENT INFORMATION MANAGEMENT
SYSTEM." Authorea Preprints (2023).
Acharya, Kamal. "Library Management System." Available at SSRN4807104 (2019).
ACHARYA, KAMAL, et al. "LIBRARY MANAGEMENT SYSTEM." (2019).
Acharya, Kamal. "Online bus reservation system project report." Authorea
Preprints (2024).
Acharya, Kamal. "Online bus reservation system project report." (2024).
Acharya, Kamal. “Online Bus Reservation System.” SSRN ElectroNIC ASIA
Journal (2024): n. pag.
Acharya, Kamal. “Student Information Management System Project.” SSRN
ElectroNIC ASIA Journal (2024): n. pag.
Acharya, Kamal. “ATTENDANCE MANAGEMENT SYSTEM.” International
Research Journal of Modernization in Engineering Technology and
Science (2023): n. pag.
35 | P a g e
SSRN: https://ssrn.com/abstract=4831638 or http://dx.doi.org/10.2139/ssrn.4831638
Acharya, Kamal, Software testing for project report. (May 16, 2023). Available at
SSRN: https://ssrn.com/abstract=4831028 or http://dx.doi.org/10.2139/ssrn.4831028
Acharya, Kamal, ONLINE CRIME REPORTING SYSTEM PROJECT. (August 10, 2022). Available at
SSRN: https://ssrn.com/abstract=4831015 or http://dx.doi.org/10.2139/ssrn.4831015
Acharya, Kamal, Burber ordering system project report. (October 10, 2022). Available at
SSRN: https://ssrn.com/abstract=4832704 or http://dx.doi.org/10.2139/ssrn.4832704
Acharya, Kamal, Teachers Record Management System Project Report (December 10, 2023). Available at
SSRN: https://ssrn.com/abstract=4833821 or http://dx.doi.org/10.2139/ssrn.4833821
Acharya, Kamal, Dairy Management System Project Report (December 20, 2020). Available at
SSRN: https://ssrn.com/abstract=4835231 or http://dx.doi.org/10.2139/ssrn.4835231
Acharya, Kamal, Electrical Shop Management System Project (December 10, 2019). Available at
SSRN: https://ssrn.com/abstract=4835238 or http://dx.doi.org/10.2139/ssrn.4835238
Acharya, Kamal, Online book store management system project report. (Febuary 10, 2020). Available at
SSRN: https://ssrn.com/abstract=4835277 or http://dx.doi.org/10.2139/ssrn.4835277
Acharya, Kamal, Paint shop management system project report. (January 10, 2019). Available at
SSRN: https://ssrn.com/abstract=4835441 or http://dx.doi.org/10.2139/ssrn.4835441
Acharya, Kamal, Supermarket billing system project report. (August 10, 2021). Available at
SSRN: https://ssrn.com/abstract=4835474 or http://dx.doi.org/10.2139/ssrn.4835474
Acharya, Kamal, Online texi booking system project report. (March 10, 2022). Available at
SSRN: https://ssrn.com/abstract=4837729 or http://dx.doi.org/10.2139/ssrn.4837729
Acharya, Kamal, Online car servicing system project report. (March 10, 2023). Available at
SSRN: https://ssrn.com/abstract=4837832 or http://dx.doi.org/10.2139/ssrn.4837832
Acharya, Kamal, School management system project report. (July 10, 2021). Available at
SSRN: https://ssrn.com/abstract=4837837 or http://dx.doi.org/10.2139/ssrn.4837837
Acharya, Kamal, Furniture Showroom Management System Project Report (March 21, 2021). Available at
SSRN: https://ssrn.com/abstract=4839422 or http://dx.doi.org/10.2139/ssrn.4839422
Acharya, Kamal, Online Vehicle Rental System Project Report (March 21, 2019). Available at
SSRN: https://ssrn.com/abstract=4839429 or http://dx.doi.org/10.2139/ssrn.4839429
Acharya, Kamal, Fruit Shop Management System Project Report (August 10, 2023). Available at
SSRN: https://ssrn.com/abstract=4841048 or http://dx.doi.org/10.2139/ssrn.4841048
Acharya, Kamal, Hall Booking Management System Project Report (December 21, 2023). Available at
SSRN: https://ssrn.com/abstract=4841055 or http://dx.doi.org/10.2139/ssrn.4841055
Acharya, Kamal, Lundry Management System Project Report (October 21, 2023). Available at
SSRN: https://ssrn.com/abstract=4841059 or http://dx.doi.org/10.2139/ssrn.4841059
Acharya, Kamal, A CASE STUDY OF CINEMA MANAGEMENT SYSTEM PROJECT (September 25, 2023).
Available at SSRN: https://ssrn.com/abstract=4841209 or http://dx.doi.org/10.2139/ssrn.4841209
Acharya, Kamal, A CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT (May 25, 2024).
Available at SSRN: https://ssrn.com/abstract=4841210 or http://dx.doi.org/10.2139/ssrn.4841210
Acharya, Kamal, ONLINE DATING MANAGEMENT SYSTEM PROJECT REPORT. (April 25, 2023). Available
at SSRN: https://ssrn.com/abstract=4842066 or http://dx.doi.org/10.2139/ssrn.4842066
36 | P a g e
Acharya, Kamal, ONLINE RESUME BUILDER MANAGEMENT SYSTEM PROJECT REPORT. (April 25,
2021). Available at SSRN: https://ssrn.com/abstract=4842071 or http://dx.doi.org/10.2139/ssrn.4842071
Acharya, Kamal, TOLL TEX MANAGEMENT SYSTEM PROJECT REPORT (August 21, 2023). Available at
SSRN: https://ssrn.com/abstract=4842082 or http://dx.doi.org/10.2139/ssrn.4842082
Acharya, Kamal, Chat Application Through Client Server Management System Project Report (June 25, 2023).
Available at SSRN: https://ssrn.com/abstract=4842761 or http://dx.doi.org/10.2139/ssrn.4842761
Acharya, Kamal, Web Chatting Application Management System Project Report (April 25, 2022). Available at
SSRN: https://ssrn.com/abstract=4842771 or http://dx.doi.org/10.2139/ssrn.4842771
Acharya, Kamal, Automobile management system project report (May 25, 2022). Available at
SSRN: https://ssrn.com/abstract=4846917 or http://dx.doi.org/10.2139/ssrn.4846917
Acharya, Kamal, College bus management system project report (April 25, 2023). Available at
SSRN: https://ssrn.com/abstract=4846920 or http://dx.doi.org/10.2139/ssrn.4846920
Acharya, Kamal, Courier management system project report (May 25, 2023). Available at
SSRN: https://ssrn.com/abstract=4846922 or http://dx.doi.org/10.2139/ssrn.4846922
Acharya, Kamal, Event management system project report (April 25, 2021). Available at
SSRN: https://ssrn.com/abstract=4846927 or http://dx.doi.org/10.2139/ssrn.4846927
Acharya, Kamal, Library management system project report II (May 25, 2020). Available at
SSRN: https://ssrn.com/abstract=4848857 or http://dx.doi.org/10.2139/ssrn.4848857
37 | P a g e