中国代码恒熠百度小偷V1.0之网页搜索(修正版)

中国代码恒熠百度小偷,演示地址http://baidu.china-code.net

以下为修正的web.aspx.cs

string str1,Result;
   string wd=System.Web.HttpUtility.UrlEncode(Request.QueryString["wd"], System.Text.Encoding.GetEncoding("GB2312"));
            string pn=Request.QueryString["pn"];
   if (pn=="")
   {
    pn="0";
   }

   string PageUrl="http://www.baidu.com/s?wd="+wd+"&pn="+pn+"&lm=0&si=&rn=10&ie=gb2312&ct=0&cl=3&f=1";
   WebClient wc = new WebClient(); 
        wc.Credentials = CredentialCache.DefaultCredentials; 
        Byte[] pageData = wc.DownloadData(PageUrl); 
        Result = Encoding.Default.GetString(pageData);
            string k = "抱歉,没有找到与“<font color=/"#C60A00/">" + wd + "</font>” 相关的网页";
           

         if (Result.IndexOf(k)==-1)
         {
             string[] strtemp = System.Text.RegularExpressions.Regex.Split(Result, "<table border=/"0/" cellpadding=/"0/" cellspacing=/"0/" style=/"margin-left:18px;height:60px;/">");
              Result = strtemp[0];
              strtemp = null;
              Result = System.Text.RegularExpressions.Regex.Replace(Result, @"提示:您可以在支持英汉互译的百度词典中查看(/S*)的解释", "");
              Result = System.Text.RegularExpressions.Regex.Replace(Result, @"提示:(/S*)及其后面的字词均被忽略,因为百度的查询限制在38个汉字以内", "");
              strtemp = System.Text.RegularExpressions.Regex.Split(Result, @"篇,用时");
              str1 = strtemp[0];
              Result = strtemp[1];
              strtemp = null;
              Result = System.Text.RegularExpressions.Regex.Replace(Result, @"找到相关网页约", "找到相关网页");
              strtemp = System.Text.RegularExpressions.Regex.Split(str1, @"找到相关网页");
              str1 = strtemp[1];
              strtemp = null;
              Response.Write("共有" + str1 + "条记录<br>");
              //strtemp = System.Text.RegularExpressions.Regex.Split(Result, "<div style=/"background-color:#EFF2FA;height:60px;width:100%;clear:both/">");
              //Result = strtemp[0];
             // strtemp = null;
              strtemp = System.Text.RegularExpressions.Regex.Split(Result, "DIV id=ScriptDiv>");
              Result = strtemp[1];
              strtemp = null;
              Result = System.Text.RegularExpressions.Regex.Replace(Result, @"- <a href=(/S*) target=""_blank/"" class=m>百度快照</a>", "");
              Result = System.Text.RegularExpressions.Regex.Replace(Result, @"a href=""s(/S*)""", "a href=$1");
              Result = System.Text.RegularExpressions.Regex.Replace(Result, @"a href=s", "a href=");
    
              Response.Write(Result);
        }

猎马搜索源码是一种用于搜索引擎优化(SEO)的开源程序。该程序的改良版称为火端搜索,它是基于原有的百度搜索引擎和好搜搜索引擎的爬虫程序。这个程序的作用是从互联网上抓取网页数据,并将其整理成可供搜索的索引。 猎马搜索源码(火端搜索改良版)的核心部分是使用PHP编写的爬虫程序。爬虫程序通过模拟人类对网页的访问,自动查找和下载网页,并将网页的内容存储到数据库中。该程序还会自动解析网页的链接,以便进一步抓取与之相关的页面。通过这种方式,猎马搜索实现了建立搜索引擎所需要的索引。 猎马搜索源码(火端搜索改良版)的另一个重要组成部分是搜索页面的前端设计。通过HTML、CSS和JavaScript等技术,将搜索结果以友好的方式展示给用户。用户可以在搜索框中输入关键词,并通过点击搜索按钮,触发后台查询相关网页内容。搜索结果会按照相关度和其他算法进行排序,并以列表或磁贴等形式展示给用户。 猎马搜索源码(火端搜索改良版)具有一些优化功能。例如,它可以根据用户的搜索历史和行为,提供个性化的搜索结果。此外,它还采用了各种算法来过滤垃圾信息、提高搜索效率和准确度。 总的来说,猎马搜索源码(火端搜索改良版)是一种功能强大的搜索引擎优化工具,它利用PHP编写的爬虫程序获得网页数据,并通过前端设计展示给用户。通过优化和改良,猎马搜索源码能提供个性化搜索结果,并提高搜索效率和准确度。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值