获取职位

xiaoxiao2021-02-27  379

using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; namespace 获取职位 { class Program { static void Main(string[] args) { WebClient wc = new WebClient(); string html = wc.DownloadString(""); MatchCollection matches = Regex.Matches(html, @"<a\shref=""http://search.51job.com/job/([0-9]{8}),c.html""\s.+>(.+)</a>"); foreach(Match item in matches) { if(item.Success) { Console.WriteLine(item.Groups[2].Value); } } Console.WriteLine(matches.Count); Console.ReadKey(); } } }
转载请注明原文地址: https://www.6miu.com/read-3619.html

最新回复(0)