Advertisement
BrU32

C# Console Extract Web Page HTML & Text SRC

Mar 6th, 2017
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication1
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. string Url;
  14. Console.Write("Enter URL To Extract:");
  15. Url = Console.ReadLine();
  16. System.Net.WebClient WC = new System.Net.WebClient();
  17. WC.DownloadFile(Url, "Temp.txt");
  18. string IO = System.IO.File.ReadAllText("Temp.txt");
  19. Console.WriteLine(IO);
  20. Console.ReadLine();
  21. }
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement