using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace _2015._5._23通过WebClient类发起请求并下载html
{
class Program
{
static void Main(string[] args)
{
#region 抓取网页邮箱
//string url = "http://zhidao.baidu.com/link?url=cvF0de2o9gkmk3zW2jY23TLEUs6wX-79E1DQVZG7qaBhEVT_xlh6TO7p0W4qwuAZ_InLymC_-mJBBcpdbzTeq_";
//WebClient wc = new WebClient();
//wc.Encoding = Encoding.UTF8;
//string str = wc.DownloadString(url);
//MatchCollection matchs= Regex.Matches(str,@"\w+@([-\w])+([\.\w])+",RegexOptions.ECMAScript);
//foreach (Match item in matchs)
//{
// Console.WriteLine(item.Value);
//}
//Console.WriteLine(matchs.Cou
C#实现简单的网页爬虫
最新推荐文章于 2025-04-07 10:03:49 发布