바 이 두 도둑

2754 단어 바 이 두 도둑
<%Function bytes2BSTR(vIn)strReturn = ""For i = 1 To LenB(vIn)ThisCharCode = AscB(MidB(vIn,i,1))If ThisCharCode < &H80 ThenstrReturn = strReturn & Chr(ThisCharCode)ElseNextCharCode = AscB(MidB(vIn,i+1,1))strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))i = i + 1End IfNextbytes2BSTR = ubb(strReturn)End Function
Function dq(key)dim XmlHttpset XmlHttp = CreateObject("Microsoft.XMLHTTP")XmlHttp.Open "GET","http://www.baidu.com/s?wd="&key&"&pn="&request("pn"), false XmlHttp.setRequestHeader "Content-Type","text/XML" XmlHttp.Senddq = bytes2BSTR(XmlHttp.responseBody)End Function
Function BR(Str)Str = Replace(Str,"{br}","
")Str = Replace(Str,vbcrlf,"
")Str = Replace(Str,"

","
")Str = Replace(Str,"

","
")Str = Replace(Str,"

","
")BR = StrEnd Function
function ubb(str)
if instr(str,"관련 페이지 찾기")=0 thenubb="아무것도 검색 되 지 않 았 습 니 다"exit functionend if
str = Replace(str,vbcrlf,"{br}")str = Replace(str,"
","{br}")str = Replace(str,"",""&vbcrlf)str = Replace(str,"dim re,Match,Matches set re = New RegExpre.Global = Truere.IgnoreCase = True
re.Pattern=".*\(.*)\<\/td>"
Set Matches = re.Execute(str)
Matchesubb=ubb&BR(Match.value)다음.Pattern="(\\-\\\\\-\\)"ubb=re.replace(ubb,"hr")"모든 정보의 간격 ubb=Replace(ubb,"td class=f>","")ubb = Replace(ubb,"","")ubb = BR(UBB)
".Pattern="(해당 페이지 를 찾 습 니 다.*초)"Set Matches=re.Execute(str)set Match=Matches(0)ubb=ubb&Match&"
"
str = Replace(str,"",""&vbcrlf)
re.Pattern="\
(.*)\<\/div>"Set Matches = re.Execute(str)set Match = Matches(0)Dim TheLinkTheLink = Matchre.Pattern="href=s?(.[^>]*)"TheLink = re.replace(TheLink,"href=""$1""")
ubb = ubb & TheLinkend function
if len(request("wd")) > 0 thenresponse.write dq(request("wd"))end if%>

좋은 웹페이지 즐겨찾기