日期:2014-05-18  浏览次数:20770 次

抓网页的小程序,为什么只能取到比较少的一部分网页代码?
private   void   button1_Click(object   sender,   EventArgs   e)
                {
                        string   str   =   " ";
                        string   FileTxt   =   " ";
                        int     count   =   0;
                        FileTxt   =   this.filetxt.Text;
                        if   (FileTxt== " ")
                        {   FileTxt   =   "html.txt ";   }
                        int   begindex   =   0;
                        int   endindex   =   0;
                        string   num   =   " ";
                        byte[]   buf   =   new   byte[38192000];
                 
                                num   =   this.tb1.Text.ToString();
                                string   keyword   =   this.keyword.Text;
                                string   kwend   =   this.kwend.Text;
                                int   index   =   num.IndexOf(keyword);
                                int   indexend   =   num.IndexOf(kwend);
                                int   start=0;
                                index=   index   +   keyword.Length;
                                                    begindex   =   Convert.ToInt32(num.Substring(index,   indexend-index));
                                endindex   =   Convert.ToInt32(this.tb2.Text);

                                for   (;   begindex   <=   endindex;   begindex++)
                                {
                &nb