Python_YouTube_Video_Downloader[1] (1)
Python_YouTube_Video_Downloader[1] (1)
SESSION- 2024-25
Computer Science Project A
Project Report On : Python YouTube
Video Downloader
SUBMITTED BY: Utkarsha Jitendra PATIL
PGT(COMPUTER SCIENCE)
1
Certificate
This is to certify that utkarsha
Jitendra patil of class 12th B have
successfully completed their
Computer Science project on
“Python YouTube Video Downloader”
under the guidance of Mrs. Pooja
Agarwal during the academic year
2024-2025 as per the guidelines
issued by Central Board of
Secondary Education (CBSE).
Signature of Principal
2
Acknowledgements
3
Thank You
Table of Contents
Page
1. Cover Page
1
2. Certificate
2
3. Acknowledgements
3
4. Table Of Contents
4
5. Introduction To Project
5
6. Objective of the Project
6
4
7. Scope of the Project
7
8. The Existing System
8
9. Proposed System
9
10. Input / Output Requirements
10
11. Future Scope of the Project
11
12. Conclusion
12
13. Python YouTube Video Downloader
13
14. Code
14 - 17
5
6
1. Introduction To Project
Python YouTube Video Downloader is an
application to download videos from
YouTube. This provides users to download
videos they need in their devices and watch
them offline.
In this python project, user has to copy the
YouTube video URL that they want to
download and simply paste that URL in the
‘paste link here’ section and click on the
download button, it will start downloading
the video. When video downloading finishes,
it shows a message ‘downloaded’ popup on
the window below the download button.
7
2. Objective of the Project
The Python YouTube Video Downloader is a
python project. The objective of this project is
to download any type of video in a fast and
easy way from YouTube in your device.
YouTube is very popular video sharing
website. Downloading a video from YouTube
is a tough job. Using Python, this task is very
easy. Few lines of code will download the
8
video from YouTube for you. And this is the
main function of the project.
9
To install the required modules run pip installer
command on the command line:
pip install tkinter
pip install pytube
10
malicious pop ups and sometimes can
download malware instead of the
video we need. So, it is safe for us to
make our own simple Python YouTube
Video Downloader and download
videos without any fear of getting
malware.
11
5.Proposed System
Python YouTube Video Downloader is a
simple software that allows the user to
download any YouTube videos directly on to
their devices. It also provides the
functionality of downloading the video in a
specific folder, chosen by the user. These
are the main features of this application.
Besides these features, the user can choose
the quality of the video before downloading
it. The user can also download an MP3
sound file of the desired video.
12
6. Input/output Requirements
• For Input:-
1. Standard Keyboard
2. Standard Mouse
• For Output: -
1. Standard Monitor
14
The Option for downloading the thumbnail: -
8.Conclusion
With the help of this project and the
inappropriate Ads.
15
version of a fully functional Python
friendly.
16
17
#CODE
from tkinter import *
from tkinter import ttk
from tkinter import filedialog
from pytube import YouTube #pip install pytube3
Folder_Name = ""
#file location
def openLocation():
global Folder_Name
Folder_Name = filedialog.askdirectory()
if(len(Folder_Name) > 1):
locationError.config(text=Folder_Name,fg="green")
else:
locationError.config(text="Please Choose Folder!!",fg="red")
#donwload video
def DownloadVideo():
choice = ytdchoices.get()
url = ytdEntry.get()
if(len(url)>1):
ytdError.config(text="")
yt = YouTube(url)
18
if(choice == choices[0]):
select = yt.streams.filter(progressive=True).first()
elif(choice == choices[1]):
select = yt.streams.filter(progressive=True,file_extension='mp4').last()
elif(choice == choices[2]):
select = yt.streams.filter(only_audio=True).first()
else:
ytdError.config(text="Paste Link again!!",fg="red")
#download function
select.download(Folder_Name)
ytdError.config(text="Download Completed!!")
root = Tk()
root.title("YTD Downloader")
root.geometry("350x400") #set window
root.columnconfigure(0,weight=1)#set all content in center.
#Entry Box
ytdEntryVar = StringVar()
19
ytdEntry = Entry(root,width=50,textvariable=ytdEntryVar)
ytdEntry.grid()
#Error Msg
ytdError = Label(root,text="Error Msg",fg="red",font=("jost",10))
ytdError.grid()
#Download Quality
ytdQuality = Label(root,text="Select Quality",font=("jost",15))
ytdQuality.grid()
#combobox
choices = ["1080p","720p","480p","360p","144p","Only Audio"]
ytdchoices = ttk.Combobox(root,values=choices)
ytdchoices.grid()
#donwload btn
20
downloadbtn =
Button(root,text="Donwload",width=10,bg="red",fg="white",command=DownloadVideo)
downloadbtn.grid()
#developer Label
developerlabel = Label(root,text="SMK Developers",font=("jost",15))
developerlabel.grid()
root.mainloop()
21