trng)) if Newstring<=0 then Newstring=Len(wstr) End Function '替换字符串函数 function ReplaceStr(ori,str1,str2) ReplaceStr=replace(ori,str1,str2) end function '==================================================== function ReadXml(url,code,start,ends) set oSend=createobject("Microsoft.XMLHTTP") SourceCode = oSend.open ("GET",url,false) oSend.send() ReadXml=BytesToBstr(oSend.responseBody,code ) start=Instr(ReadXml,start) ReadXml=mid(ReadXml,start) ends=Instr(ReadXml,ends) ReadXml=left(ReadXml,ends-1) end function
function SubStr(body,start,ends) start=Instr(body,start) SubStr=mid(body,start+len(start)+1) ends=Instr(SubStr,ends) SubStr=left(SubStr,ends-1) end function
dim getcont,NewsContent dim url,title url="http://www.***.com"'新闻网址knowsky.com getcont=ReadXml(url,"gb2312","<table class=k2 border=""0""","</table>") getcont=RegexHtml(getcont) dim KeyId,NewsClass,City,Position,HouseType,Level,Area,Price,Demostra
dim ContactMan,Contact for i=2 to ubound(getcont) response.Write(getcont(i)&"__<br>") tempLink=mid(getcont(i),instr(getcont(i),"href=""")+6,instr(getcont(i),""" onClick")-10) tempLink=replace(tempLink,"../","") response.Write(i&":"&tempLink&"<br>") NewsContent=ReadXml(tempLink,"gb2312","<td valign=""bottom"" width=""400"">","<hr width=""760"" noshade size=""1"" color=""#808080""> ") NewsContent=RemoveHtml(NewsContent) NewsContent=replace(NewsContent,VbCrLf,"") NewsContent=replace(NewsContent,vbNewLine,"") NewsContent=replace(NewsContent," ","") NewsConten 上一页 [1] [2] [3] [4] [5] [6] [7] 下一页 |