Sunday, April 21, 2019

How to Develop an ASP.NET Facebook Video Downloader web application

Hi friends, After 2 weeks of research, I knew how to download any facebook video programmatically in C#, so I created a small web application that allows you to download any Facebook video using its URL.

The application looks like this:

https://i.redd.it/5wt53890olt21.png

The Idea is like this:

You scrape the Facebook Video URL and Load its HTML Source code.

Then using Regular expressions you get the MP4 direct file URL

string regx = "sd_src_no_ratelimit:\"([^\"]+)\""; 

After this, you will get the Direct URL and Download it. using the following snippet:

 System.Net.WebClient webClient = new System.Net.WebClient(); byte[] bytes = webClient.DownloadData(Video_DirectURL); Response.ContentType = "video/mp4"; Response.AppendHeader("Content-Disposition", "attachment; filename=" + VideoID + ".mp4"); Response.BinaryWrite(bytes); Response.End(); 

That's it, if you need any help, Or if you need the full source code, comment below or contact me and I will share everything with you.

Thank you.

How to Develop an ASP.NET Facebook Video Downloader web application Click here
  • Blogger Comment
  • Facebook Comment

0 comments:

Post a Comment

The webdev Team