4.85 out of 5
4.85
42 reviews on Udemy

Build A YouTube Downloader With C# And GitHub

PLEASE DO NOT BUY THIS COURSE. YOUTUBE HAS CHANGED THE API. IT DOES NOT WORK ANYMORE.
Instructor:
A O
463 students enrolled
Build An Interface That Does Not Freeze During Program Execution
Write Code That Uses YouTube Application Programming Interfaces
Write Code That Can Download Video Files From YouTube
Write Code That Can Download Audio Files From YouTube
Write Code That Ensures That YouTube Links Are Correctly Formatted
Become Familiar With The Concept Of Normalized YouTube Links
Learn How To Download Files From YouTube Play Lists
Write Code That Uses Asynchrony For Improved Program Performance
Write Code That Uses Try/Catch To Ensure Errors Are Gracefully Handled
Learn How To Use Background Worker Controls
Learn How To Use Timer Controls

PLEASE DO NOT BUY THIS COURSE. YOUTUBE HAS CHANGED THE API. 

Why take this course? In this course you learn how to build a professional YouTube downloader application using Visual Studio Community 2015. This application can download video files, audio files, and even files from YouTube play lists. During the process, you see how to build an interface, how to add class files, how to add external files, and how to make use of libraries already posted on GitHub. The construction of the project is decomposed into small steps so you can build along with the course, and not feel overwhelmed. The course consists of HD videos, many of which are short, some challenges, along with the solutions, and complete visual studio files that you can download as zips or clone from GitHub. Let’s get coding!

Introduction

1
What We Will Be Building - Youtube Downloader Overview

Lesson Objective: To show you the final form of the project

How This Step Fits Into Project: This step illustrates the final stage of the project so that you have a reference point as we complete the course

Learning Objectives:

1) Learn how to run the complete project by importing it into Visual Studio 2015

2) Learn how the program operates by downloading a video, and an audio file

3) You can get Visual Studio 2015 Community below

2
How To Get Project Files As Zips Or From GitHub

Lesson Objective: Become familiar with cloning a repository from GitHub

How This Step Fits Into Project: This step matters because it gives you important resources for ensuring that you have a definite and complete reference to each stage of the project

Learning Objectives:

1) Learn about GitHub

2) Learn how to clone a repository inside Visual Studio

3) See how each stage of the project can also be downloaded as a zip file

Designing the User Interface

1
Creating The Project In Visual Studio Community 2015

Lesson Objective: Create the project in Visual Studio

How This Fits Into Project: This step builds the basic user interface

Learning Results:

1) Learn how to create a Windows Forms C# project

2) Learn how to change the text property of the form so it says "YouTube Downloader 1.0"

3) Learn how to change the code name of the form so it says frmYTDownloader

4) Learn how to add a picture box, and how to change the name of the box in code to picBox

5) Learn how to populate the picture box with the attached picture, and how to stretch the picture properly

6) Learn how to set the horizontal position of the picture box with complete control

7) Learn how to set the FormBorderStyle property of the form so it cannot be resized after program launch

8) Learn how to set the icon property of the form using the attached icon

9) You can get the Visual Studio files, image and icon in the attached zip

2
Building The Interface By Adding User Controls

Lesson Objective: Add user controls to the to build the interface

How This Fits Into Project: This step builds the user interface to make the program usable

Learning Results:

1) Learn how to make the interface

2) Learn how to set the values to be displayed inside the combo box

3) Learn how to view all the components defined inside a form

4) You can view the components inside the attached picture

5) You can view the the full interface in the attached picture

6) There is also a PDF attached showing all the controls labeled with their names in code

7) The preview picture box will be added towards the end of the course

3
Setting Up The FolderBrowserDialog Control

Lesson Objective: Setup a folder browser dialog for choosing paths to files

How This Fits Into Project: This step gives the user control over the storage location of downloaded files

Learning Results:

1) Set up a default download location

2) Add a folder browser dialog

3) Connect the button labeled "Choose" to the folder browser dialog

5) Write code to populate the path box

Using Free C# Libraries From Github

1
Searching Github For C# Libraries And Adding YouTube Extractor

Lesson Objective: Become aware of free C# code libraries on GitHub, especially those focusing on YouTube

How This Fits Into Project: This step is important because it's the one that shows how we can use existing C# libraries to create the heart of our application

Learning Results:

1) Learn how to go to GitHub.com and search for the YouTube Extractor library

2) Become aware of Nuget packages, and that VS supports importing Nuget packages

3) Take a look at some of the supported platforms

4) Take a look at examples of how the YouTube Extractor library can be used to download videos and MP3's

5) Learn how to check on the .Net Framework inside Visual Studio

6) Install YouTube extractor in our application using a Nuget package

7) Confirm that the YouTubeExtractor and NewtonSoft.Json references and packages are installed

2
YoutubeExtractor Library Walk-Through

Lesson Objective: Decide which of the classes available in the YouTube Extractor library is the right one

How This Step Fits Into Project: There are some additional classes into the YouTube Extractor library, so this step helps us to focus on the ones that are most important to adding the functionality we need to build our app

Learning Results:

1) Learn how to browse a namespace using the object browser

2) Review the classes that are important to our project

3) Take a look at some of the key methods needed to make our program work

4) Take a look at the VideoInfo class as a way of representing downloads

3
Confirming the YoutubeExtractor Library Works For Video Downloads

Lesson Objective: Confirm that the video download function works as expected

How This Step Fits In: This step allows us to confirm that the function works as expected by trying it with an actual YouTube URL

Learning Results:

1) Before we do it together, see whether you can figure out how to download a file

2) Use the code on GitHub at: https://github.com/flagbug/YoutubeExtractor

3) You can use the video at: https://www.youtube.com/watch?v=pv-6rweZR_s

4) Become aware of the fact that this step runs synchronously, so the app freezes

5) Learn how to add the YouTubeExtractor namespace

6) Learn how to add the System.IO name space to make Path.Combine work

7) The download path in the Path.Combine must be changed to the path on your drive

8) Make sure you disable the progress bar for now

4
Confirming the YoutubeExtractor Library Works For Audio Downloads

Lesson Objective: Confirm that the audio download function works as expected

How This Step Fits In: This step allows us to confirm that the function works as expected by trying it with an actual YouTube URL

Learning Results:

1) Before we do it together, see whether you can figure out how to download the audio file

2) Use the code on GitHub at: https://github.com/flagbug/YoutubeExtractor

3) You can use the video at: https://www.youtube.com/watch?v=3E2bOe_LDrc

4) The download path in the Path.Combine must be changed to the path on your drive

5) Make sure you disable the progress bars for now

6) The complete stage of this project is available as a zip download


Building The Data Model

1
Building The YouTube Data Model

Lesson Objective: Learn what a data model is and how creating one improves our project

How This Step Fits In: This step helps us understand why we need to create three new classes to help organize the structure of the project. Instances of these classes will be made later to help us download files.

Learning Results:

1) Learn why we need a data model class

2) Learn that this particular class contains only properties that describe each download

3) Understand that having a data model allows passing objects around, together with all the properties, so the code is more clean

4) For example, writing download(YouTubeModel) is cleaner then download(URL, Location,...) and so on

5) Create a new class file called YouTubeModel.cs

6) Create code that defines the YouTubeModel class

7) Create code that defines the YouTubeVideoModel class

8) Create code that defines the YouTubeAudioModel class

Data Validation and Interface Control Access

1
Validating Youtube Link Challenge

Lesson Objective: Try to figure out how to validate a YouTube URL

How This Step Fits In: This lesson challenges you to construct a function that ensures that the YouTube links entered by the user are correctly formatted

Learning Results:

1) Become aware of the concept of a Tuple as a simple data structure that can store multiple data types

2) Learn how to launch a MessageBox to display a message to the user

3) There are two hints available as PDF's in the supplementary materials area

2
Validating Youtube Link Challenge Solution

Lesson Objective: See how to write a function that validates YouTube URL's to ensure they are correctly formatted

How This Step Fits In: This steps illustrates the solution to the challenge posted above, and helps to ensure our application runs more smoothly

Learning Results:

1) Learn how to create a method that perform link validation

2) Learn how to use an existing method called TryNormalizeYoutubeURL

3) Become familiar with the concept of an out parameter as representing a value that a method can set and return to the calling code

4) See how to confirm that this validation works as expected

3
Validating Folder Path

Lesson Objective: Learn how to check that a folder exists

How This Step Fits In: This step counts because it helps to ensure a user cannot enter an invalid download location

Learning Results:

1) Understand that the folder path text box can be typed in

2) Learn how to ensure that the path entered in the box is valid

3) Learn how to confirm that the folder validation works

4
Finalizing Youtube Link Validation

Lesson Objective: Pass a tuple return type into another method to perform a download

How This Step Fits In: This step matters because it illustrates how we can make use of a validated link

Learning Objectives:

1) Learn how to use part of a tuple in an if condition check

2) See a detailed description of the difference between normalized and unnormalized URL's

3) Example of a normalized URL:

https://www.youtube.com/watch?v=nmsXmr6WV_c

4) Example of a URL to be normalized:

https://www.youtube.com/watch?v=68k_Tdx42MY&list=PLJQL6rmQXweVpjBOfXHgCCM7f38wsa_1V&index=1

5
Restrict Access To Interface Controls During Download Challenge

Lesson Objective: This lesson challenges you to figure out how to restrict access to the components of the interface while a download is in progress

How This Step Fits In: This step matters because we want to ensure that users cannot start multiple downloads while a download is in progress

Learning Results:

1) See how to add a simple method where it's called, and also how to add the method stub

2) See whether you can figure out how to disable the controls in the form before watching the solution video

3) The solution is provided in the next video

6
Restrict Access To Buttons During Download Solution

Lesson Objective: Write code to restrict access to interface components while a download is in progress

How This Step Fits In: This step shows the solution to the challenge above

Learning Results:

1) Learn how to use the Enabled property of controls to restrict access to them

2) See how to test the code with a real download

7
Enable Access To Buttons Once Download Is Complete Challenge

Lesson Objectives: This lesson challenges you to enable the controls on the interface after a download completes

How This Step Fits In: This step matters because it ensures that the interface becomes usable again after a download

Learning Results:

1) Add a call to EnableAccessibility()

2) Use thread sleeping to simulate the process of downloading a file

3) Put in stub for EnableAccessibility()

8
Enable Access To Buttons Once Download Is Complete Solution

Lesson Objective: Learn how to enable interface controls after a download completes

How This Step Fits In: This step counts because it makes the program ready for another run

Learning Results:

1) Learn how to make interface controls work again after a download completes

2) Understand there is a difference between clearing the text property of a control and enabling the control

Getting Ready To Download

1
Attaching The FileDownloader.cs Class File

Lesson Objective: Add FileDownloader.cs to the project

How This Step Fits In: This step matters because the FileDownloader.cs file contains methods that actually download both MP3 and video files from YouTube, and code that prevents the user interface from freezing

Learning Results:

1) Learn how to add an existing C# file

2) Learn why FileDownloader.cs has to be added to the project

3) Understand that Task.Run in DownloadAudio and DownloadVideo makes the user interface not freeze during a download

4) Understand why FileDownloader contains certain name spaces


2
Instantiating the YoutubeVideoModel Object

Lesson Objective: Create a YouTubeVideoModel object, and pass it to the DowloadVideo method

How This Step Fits In: This step matters because it connects the YouTubeVideoModel class with the combo box to allow selecting a video to download

Learning Results:

1) Learn how to create an instance of the YouTubeVideoModel class

2) Learn how to set a couple properties of this instance

3) Learn how to pass this instance into the DownloadVideo method

3
Instantiating The YoutubeAudioModel Object

Lesson Objective: Create A YouTubeAudioModel object, and pass it to the DownloadAudio method

How This Step Fits In: This step matters because it shows how to set some of the properties of a YouTubeAudioModel object

Learning Results:

1) See how to instantiate an object of type YouTubeAudioModel

2) Set some of the properties of this object

3) Learn how to pass the object into DownloadAudio

Downloading The Video Files

1
Populating The YoutubeVideoModel Object

Lesson Objective: Populate the YouTubeVideoModel and call the DownloadVideo method to complete a download

How This Step Fits In: This is the step that actually downloads a video from YouTube

Learning Results:

1) Create the DownloadVideo method

2) Set the properties of the object to be downloaded

3) Call FileDownloader.DownloadVideo with the YouTubeVideoModel as argument

4) Understand why a try/catch construct is needed to wrap the code

2
Wiring Up The Video Download Event Handlers

Lesson Objective: Hook up event handlers so that accessibility, the progress bar, and opening the download folder are enabled after a download

How This Step Fits In: This is code that executes after a download, or during a download to make the application more user friendly by updating the progress bar, and opening the download location with the downloaded file selected

Learning Results:

1) Learn how to enable control access after a download completes

2) Learn how to update a progress bar as a download runs

3) Learn how to open a folder after a download completes

3
Updating File Name Label Challenge

Lesson Objective: Pose challenge to update the label that shows the name of a file being downloaded

How This Step Fits In: This step matters because a file name is more friendly to users than a URL

Learning Results:

1) Figure out how to update the file name label with the name of a file being updated

2) A hint is provided in the supplementary materials area

4
Updating File Name Label Solution

Lesson Objective: Show solution to file name label challenge

How This Fits In: This step shows how to correctly position a method call to ensure a file name is displayed

Learning Results:

1) Learn how to position a method call

2) Learn how to write a method that displays the title of a file as it downloads


Downloading The Audio Files

1
Audio Download Challenge

Lesson Objective: Pose challenge to figure out how to implement audio downloading

How This Step Fits In: This step completes the download functionality of the application, and is very similar to the step taken to figure out how to download video

Learning Results:

1) Figure out how to download audio using the DownloadAudio method

2
Populating The YoutubeAudioModel Object Solution

Lesson Objective: Present a solution to the audio download challenge

How This Step Fits In: This step completes the audio download portion of the application

Learning Results:

1) Learn how to set the properties of an audio downloader object

2) Learn how to call the DownloadAudio method with the audio downloader object

3
Wiring up the Audio Download Event Handlers

Lesson Objective: Hook up event handlers

How This Step Fits In: This step matters because it makes the progress bar, and check box respond during and after an audio download

Learning Results:

1) Learn how to connect events and event handler to enable control access after a download

2) Learn how to update the progress bar

3) Learn how to open the folder with the downloaded file selected

Add Preview Picture Box

1
Add A Background Worker Control To Fetch Images

Lesson Objective: See how to add a background worker to fetch images from YouTube to show in preview box

How This Step Fits In: In case a video takes a while to download, this gives the user the option to preview the download

Learning Results:

1) Add picture box for showing pictures to preview

2) Learn how to add a background worker

3) Learn how to write code to make the backgroundworker work

4) Add the System.Net namespace reference

2
Add A Timer Control For Showing Images In Preview Box

Lesson Objective: Add a timer control to run through a sequence of pictures as a video downloads

How This Step Fits In: This step helps to ensure the pictures in the preview box changes

Learning Results:

1) Add a timer control

2) Write code to start the timer

3) Write code to stop the timer

3
Final Installation And Testing Of Whole Program

Lesson Objective: Update the file name label, and perform final testing of software

How This Step Fits In: This step counts because it confirms the application works as shown at the beginning of the course

1) Install the application

2) Increase the font size

3) Run the application through a complete cycle of possible inputs to confirm all the features work as expected

Where To Go From Here

1
Searching Github For C# Libraries To Get Ideas For More Features

Lesson Objective: Learn about similar projects on GitHub that can be used to add new features to ours

You can view and review the lecture materials indefinitely, like an on-demand channel.
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
4.9
4.9 out of 5
42 Ratings

Detailed Rating

Stars 5
23
Stars 4
13
Stars 3
5
Stars 2
1
Stars 1
0
e49516ce1a59169bebad118ae4f538e3
30-Day Money-Back Guarantee

Includes

2 hours on-demand video
1 article
Full lifetime access
Access on mobile and TV
Certificate of Completion