Advertisement
idegree

HAP

Oct 30th, 2012
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.66 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. using System.Web;
  7. using System.Net;
  8. using HtmlAgilityPack;
  9.  
  10. namespace VK
  11. {
  12.     class Program
  13.     {
  14.         static void Main(string[] args)
  15.         {
  16.             HtmlWeb htmlWeb = new HtmlWeb();
  17.             HtmlDocument doc = htmlWeb.Load("http://vk.com/id1");
  18.             HtmlNodeCollection links = doc.DocumentNode.SelectNodes("//a[@href]");
  19.             foreach (HtmlNode link in links)
  20.             {
  21.                 Console.WriteLine(link.Attributes["href"].Value);
  22.             }
  23.             Console.ReadKey();
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement