1
Answer

Issue in downloading video from Youtube

B-Abbasi

B-Abbasi

12y
1.1k
1
Hi.
I am trying to make a video download application for desktop.
Now the problem is that following code works fine

        WebClient webOne = new WebClient();
        string temp1 = " http://www.c-sharpcorner.com/UploadFile/shivprasadk/visual-studio-and-net-tips-and-tricks-15/Media/Tip15.wmv";
        webOne.DownloadFile(new Uri(temp1), "video.wmv");

           
but following doesn't:

        temp1="http://www.youtube.com/watch?v=Y_UmWdcTrrc&feature=plcp";
        (in this case a 200-400 kilobyte junk file gets downloaded )

difference between the two url's is obvious, first one contains exact name for file while other seems to be encrypted in some way,...

I was unable to find any solution to the problem so I would highly appreciate a little help here, Thanks. 
Answers (1)
0
Sanjeeb Lenka
NA 22.1k 1.3m 11y
hi,

you have to set the startup object. for set the start up object follow this step.

open solution explorer. select the solution or right click on solution and click on properties.


in property window set the startup object as your class name.

follow the screen.




2nd