亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

C#簡(jiǎn)單爬蟲案例分享

 更新時(shí)間:2021年01月28日 08:46:00   作者:Mask-male  
這篇文章主要為大家分享了C#簡(jiǎn)單爬蟲案例,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下

本文實(shí)例為大家分享了C#簡(jiǎn)單爬蟲案例,供大家參考,具體內(nèi)容如下

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
 class Program
 {
  static void Main(string[] args)
  {

   WebClient wc = new WebClient();
   wc.Encoding = Encoding.UTF8;
   string html = wc.DownloadString("http://www.lagou.com/");

   MatchCollection matches = Regex.Matches(html, "<a.*jobs.*>(.*)</a>");
   foreach (Match item in matches)
   {
    Console.WriteLine(item.Groups[1].Value);
   }
   Console.WriteLine(matches.Count);
   Console.ReadKey(); 
  }
 }
}

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

最新評(píng)論