![]() |
#2
multiple19022008-05-17 14:21
|
Server.ScriptTimeOut=120
on error resume next
url="http://www.baidu.com/s?wd='"&Y&"'"
softcode=getHTTPPage(url)
if err.number=0 then
start=Instr(softcode,"相关搜索")
over=Instr(softcode,"与百度对话")
musicOverId=ubound(Split(mid(softcode,start,over-start),"</td><td nowrap class='"s"'> </td>"))-1
if musicOverId<>"" then
for MusicStartID=1 to Gjc
start=Instr(softcode,"<td nowrap class='"f14"'>"&MusicStartID&"</td>")
if musicOverId=musicOverId then
over=Instr(softcode,"</html>")
else
over=Instr(softcode,"<td nowrap class='"f14"'>"&MusicStartID+1&"</td>")
end if
Txt=mid(softcode,start,over-start)
start=Instr(Txt,"tn=baidur>")+10
over=Instr(Txt,"</a>")
Txts=mid(Txt,start,over-start)
if Txts="" then
else
Set Rs = Server.CreateObject("ADODB.RecordSet")
Rs.Open "select * from E where E = '"&Txts&"'",Conn,1,3
If Rs.Eof Then
Rs.Addnew
Rs("E")=Txts
Rs("Yid")=request("Yid")
Eid=rs("Eid")
Rs.Update
一直不行.是采集百度的相关搜索的.请帮忙看看!