C# Tutorial – Download Youtube Video | FoxLearn

45
3



Youtube downloader using YoutubeExtractor in C# step by step. The C# Basics beginner course is a free C# Tutorial Series that helps beginning programmers learn the basics of the C# Programming Language. This is the best way to Learn C# for beginners

c# – Downloading video from YouTube
download Youtube Video in C#
using YoutubeExtractor is a library for .NET, written in C#, that allows to download videos from YouTube and/or extract their audio track
How to Create a Youtube Downloader using C#
youtube downloader c#
Download videos from Youtube using C#
How to download videos from YouTube (C#)
c# code for downloading youtube video
YouTube Downloader Using C# .NET
Full C# code to download videos from YouTube in any quality
Build A YouTube Downloader With C# And GitHub

Nguồn:https://wijstaanvooronzegrondrechten.org/

45 COMMENTS

  1. IEnumerable<VideoInfo> videos = DownloadUrlResolver.GetDownloadUrls(txtUrl.Text);

    error Video is romoved or has an age destriction in all videos which i try download. How can i fix it? Please help me. I use using YoutubeExtractor. For answer: taras.odynyuk@gmail.com

  2. Hey Foxlearn Team,

    You are doing great,i am constantly follow your video and unleash my skills
    .
    I am downloading video/audio from YouTube using C#. But i am getting this error again n again.I have tried different URL even kids or video but didn't work

    Error is Video is removed or has an age restriction

    Please help me out,

    Thanks

  3. Bonjour,
    Merci pour ce tutoriel !
    J'ai une erreur aussi sur la ligne IEnumerable, pouvez-vous m'envoyer la source s'il vous plaît afin que je puisse comparer et comprendre.
    Merci d'avance !
    monto.julien@gmail.com

  4. I like the setup using the approach from the YouTubeExtractor library. However, the library is obsolete, and due to YouTube changes, YouTubeExtractor WILL NOT WORK and should be deprecated unless / until there is a newer version that is up to date with YouTube's current API interfaces.

    At the time of writing, if you implement this specific approach using YouTubeExtractor, it will fail, throwing the following error message (note: Error message is also not correct):

    "Video is removed or has age restriction."

    The above error is thrown when the GetDownloadUrls method is called here:

    IEnumerable<VideoInfo> videos = DownloadUrlResolver.GetDownloadUrls(txtLink.Text, true);

  5. can you please send me the source code of this ? i tried and wrote your code but it works fine and Display the GUI but does not download video my email najeebalikhel@gmail.com i have done it many times from gethub as well but not working bro if you help me in this regard

  6. Attention Please, the youtube extractor doesn't work properly, what is the next solution I am unable to download any video with this downloader since about to 24 hours of hard struggling. I have copied your codes from this video word to word but still facing a problem like this Error Message "YoutubeExtractor.VideoNotAvailableException: 'Video is removed or has an age restriction" How to resolve this error, Please reply me with best solution.
    Waiting for your reply please.
    "

  7. Anybody know why downloading lower quality videos that the download time is very slow? If I download this video in 720 it only takes a few seconds, whereas when I tried downloading in 480 just to play around it ended up taking well over 5 minutes. Thoughts or explanations?

  8. Please help me. I'm getting error and I have homework. NoVideoAvailable error while IEnumerable<VideoInfo> videos = DownloadUrlResolver.GetDownloadUrls("myVideoLink");

    Exception thrown: 'YoutubeExtractor.VideoNotAvailableException' in YoutubeExtractor.dll
    Video is removed or has an age restriction.

  9. Very helpful video, but today in 2019 it's not working anymore 🙁

    P.S. c# could not parse the youtube page for url

  10. YoutubeExtractor.YoutubeParseException: 'Could not parse the Youtube page for URL https://www.youtube.com/watch?v=TnG3urCD_m0This may be due to a change of the Youtube page structure.

    Please report this bug at www.github.com/flagbug/YoutubeExtractor/issues'

  11. Hi, Fox Learn.
    Thanks For This Video

    But I Have Get An Error When I Click on Download Button.

    System.ArgumentException
    HResult=0x80070057
    Message=Illegal characters in path.
    Source=mscorlib

    on This Line

    VideoDownloader downloader = new VideoDownloader(video, Path.Combine(Application.StartupPath + "\", video.Title + video.VideoExtension));

  12. could you send the source code to thomas1131@hotmail.co.uk? i dont understand mine, whenever i test it through VS i get "Illegal characters in path" for VideoDownloader downloader = new VideoDownloader(video, Path.Combine(Application.StartupPath + "\", video.Title + video.VideoExtension));

  13. I have some problems with this line:
    VideoDownloader downloader=new VideoDownloader(video, Path…). I can't type Path.Combine….

  14. Excelente video, me gustaria que me comparta ese codigo pero en vb.net "ortiz270597@gmail.com", o podria hacer un video que sea en vb.net, muy agradecido

  15. I made this Apllication Its Working in my visual studio but when i Deploy this app to share with my friends .this app give error after instillation when i run the application and put youtube video url.
    the error is following please help me Fox Learn Thansk
    "
    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************ Exception Text ************
    System.ArgumentException: Illegal characters in path.
    at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
    at System.IO.Path.Combine(String path1, String path2)
    at YoutubeDownloader.Form1.DownloadBt_Click(Object sender, EventArgs e)
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.Button.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    ************ Loaded Assemblies ************
    mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2650.0 built by: NET471REL1LAST_B
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
    —————————————-
    YoutubeDownloader
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/Zsoft/YouTube%20Downloader/YoutubeDownloader.exe
    —————————————-
    System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2558.0 built by: NET471REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    —————————————-
    System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2634.0 built by: NET471REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
    —————————————-
    System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2558.0 built by: NET471REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    —————————————-
    System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2558.0 built by: NET471REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    —————————————-
    System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2634.0 built by: NET471REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
    —————————————-
    System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2612.0 built by: NET471REL1LAST_B
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
    —————————————-
    YoutubeExtractor
    Assembly Version: 0.10.11.0
    Win32 Version: 0.10.11
    CodeBase: file:///C:/Program%20Files%20(x86)/Zsoft/YouTube%20Downloader/YoutubeExtractor.DLL
    —————————————-
    Newtonsoft.Json
    Assembly Version: 6.0.0.0
    Win32 Version: 6.0.6.17820
    CodeBase: file:///C:/Program%20Files%20(x86)/Zsoft/YouTube%20Downloader/Newtonsoft.Json.DLL
    —————————————-
    System.Web
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2623.0 built by: NET471REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Web/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Web.dll
    —————————————-
    System.Numerics
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2558.0 built by: NET471REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
    —————————————-

    ************ JIT Debugging ************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

    <configuration>
    <system.windows.forms jitDebugging="true" />
    </configuration>

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.

    "

  16. how to catch if the download finished? There is downloader.DownloadFinished event. Need sample about this. ty. also file downloaded as .aac file not mp4

LEAVE A REPLY

Please enter your comment!
Please enter your name here