C#实现web信息自动抓取[8]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 yutao728 的 blog

                int pos1 = tmpallstr.indexof( blockb );

                int pos2 = tmpallstr.indexof( blocke,pos1 + blockb.length );

                if ( pos1>0 && pos2>0 && pos2>pos1 )

                {

                    ret = tmpallstr.substring( pos1 + blockb.length,pos2 - pos1 - blockb.length );

                    ret = ret.substring( ret.indexof( "<" ));

                    while( ret.indexof( "<a" ) >= 0 )

                    {

                        ret = ret.substring( 0,ret.indexof( "<a" ) ) + "<a" + ret.substring( ret.indexof( "<a" ) + 2 );

                    }

本文关键:C#实现web信息自动抓取
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top