假如,我在www.google.com里输入“数据结构”,会出来很多关于“数据结构的”信息,并且有100多翻页。
现在想通过一个程序,实现自动翻页与读取各页面内容(汇总到一个文本文件中或汇总个一个本地网页中),不知道怎么弄?
高手们请指教,急用。

解决方案 »

  1.   

    http://www.google.com/search?q=关键字&hl=en&newwindow=1&start=10&sa=N
    这个start=10就表示页码,10表示第二页,20表示第三页,以此类推
      

  2.   

    http://topic.csdn.net/u/20071122/20/1bdfceb3-97e2-4236-90fd-4e8f49223f43.html
    不懂可以给留言给我
      

  3.   

    WebRequest/WebResponse一个请求,一个接受,回来自己处理一下
      

  4.   

    我申明一下:我最关键的是取出来是乱码,取的方法会的,也用了 http://www.google.com/search?q=关键字&hl=en&newwindow=1&start=10&sa=N 
    这个start=10就表示页码,10表示第二页,20表示第三页,以此类推  这样一个循环语句.
    我的要求是  怎么解决取出来是乱码问题.还有能不能只取到查询的记录而不是整个网页的内容,请大哥大姐们帮忙.  
      

  5.   

    string googleUrl = @"http://www.google.cn/search?q={0}&complete=1&hl=zh-CN&inlang=zh-CN&newwindow=1&start=80&sa=N";
    string Key = System.Web.HttpUtility.UrlEncode(resourceName, System.Text.UnicodeEncoding.GetEncoding("GB2312")).ToUpper();  //搜索关键字的编码转换
    baiduUrl = string.Format(baiduUrl, Key);http://www.google.cn/search?q={0}&complete=1&hl=zh-CN&inlang=zh-CN&newwindow=1&start=80&sa=N每次改变的值是start的值...可以通过获得它的总页数,然后传入各个页数的值来获取各个页面的内容....                    
      

  6.   

    获得各页的内容可以通过以下代码实现,只要传入URL即可..
    HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(googleUrl);
                        HttpWebResponse response =(HttpWebResponse) request.GetResponse();
                        Stream stream = response.GetResponseStream();
                        StreamReader sr = new System.IO.StreamReader(stream, Encoding.Default);                    string HTML = sr.ReadToEnd();
                        sr.Close();
                        stream.Close();
      

  7.   

    string   googleUrl   =   @"http://www.google.cn/search?q={0}&complete=1&hl=zh-CN&inlang=zh-CN&newwindow=1&start=80&sa=N"; 
    string   Key   =   System.Web.HttpUtility.UrlEncode(resourceName,   System.Text.UnicodeEncoding.GetEncoding("GB2312")).ToUpper();     //搜索关键字的编码转换 
    baiduUrl   =   string.Format(baiduUrl,   Key); 
    更正
    string   googleUrl   =   @"http://www.google.cn/search?q={0}&complete=1&hl=zh-CN&inlang=zh-CN&newwindow=1&start=80&sa=N"; 
    string   Key   =   System.Web.HttpUtility.UrlEncode(resourceName,   System.Text.UnicodeEncoding.GetEncoding("GB2312")).ToUpper();     //搜索关键字的编码转换 
    googleUrl=string.Format(googleUrl,   Key); 
      

  8.   

    楼上的大哥,还是不行,不知道是不是小弟不才,还是google.com加密了
      

  9.   

       对了,我的是要搜索www.scholar.google.com不知道怎么看关键字编码?
      

  10.   

    有最新进展了,有英文'web'搜索可以了,但是用中文"网页"还是乱码,不知道什么回事?
      

  11.   

    经过鉴定,LZ是微软Live Search项目的开发人员,开发进展很慢,Bill大叔很生气,于是开发组急中生智,直接盗取Google的搜索结果来冒充。BS微软,顺便也BS一下LZ.
      

  12.   

    liuyun1987思路完全正确.
    顺便鄙视下bwangel