当前位置: 代码迷 >> Web开发 >> 抓取baidu收录页面有些有关问题。请高人指点一下。程序为ASP
  详细解决方案

抓取baidu收录页面有些有关问题。请高人指点一下。程序为ASP

热度:171   发布时间:2012-02-28 13:06:36.0
抓取baidu收录页面有些问题。请高人指点一下。程序为ASP - Web 开发 / 其他
抓取baidu收录页面有些问题。请高人指点一下。程序为ASP

就baidu的抓取结果总是0

<%
sl=request.QueryString("sl")
sw=request.QueryString("url")
sw=replace(sw,"http://","")
if sl="baidu" then
'百度收录
BaiduCldeContent = getHTTPPage("http://www.baidu.com/s?bs=site:"&sw&"&cl=3") '要提取页面的url地址
StartBaidu="百度一下,找到相关网页"
OverBaidu=",用时"
mmm=GetBody(BaiduCldeContent,StartBaidu,OverBaidu,IncluL,IncluR)
mmm=replace(mmm,"相关结果","")
mmm=replace(mmm,"无","0")
mmm=replace(mmm,"个","")
%>
document.getElementById("seo_baidu_0").value = "<%=mmm%>";document.getElementById("flag_baidu_0").innerHTML = "<img src='images/check_right.gif'> <a 

href='http://www.baidu.com/s?wd=site:<%=sw%>' target='_blank'>查看详细</a>";
<%
elseif sl="google" then
'谷歌收录
googleCldeContent = getHTTPPage("http://www.google.com.hk/search?hl=zh-CN&q=site%3A"&sw&"&meta=&aq=1") '要提取页面的url地址
Startgoogle="找到约 "
Overgoogle=" 条结果"
mmm=GetBody(googleCldeContent,Startgoogle,Overgoogle,IncluL,IncluR)
%>
document.getElementById("seo_google_0").value = "<%=mmm%>";document.getElementById("flag_google_0").innerHTML = "<img src='images/check_right.gif'> <a 

href='http://www.google.com.hk/search?hl=zh-CN&q=site%3A<%=sw%>' target='_blank'>查看详细</a>";
<%
elseif sl="pr" then
PRCldeContent = getHTTPPage("http://www.xnbird.com/ranks/pr.php?website="&sw) '要提取页面的url地址
Startyahoo="images/pagerank"
Overyahoo=".gif"
mmm=GetBody(PRCldeContent,Startyahoo,Overyahoo,IncluL,IncluR)
  mmm=replace(mmm,chr(10),"")
%>
 document.getElementById("seo_pr_0").value = "<%=mmm%>";document.getElementById("flag_pr_0").innerHTML = "<img src='images/check_right.gif'> <a href='ranks/pr.php?website=<%

=sw%>' target='_blank'>查看详细</a>";

<%
elseif sl="kz" then
'PRCldeContent = getHTTPPage("http://i.linkhelper.cn/getbaiducachetime.asp?queryurl=http://www.xnbird.com&i=0") '要提取页面的url地址
PRCldeContent = getHTTPPage("http://www.baidu.com/s?wd=http://"&sw&"") '要提取页面的url地址
Startyahoo="</b>/ "
Overyahoo=" </span> - <a "
mmm=GetBody(PRCldeContent,Startyahoo,Overyahoo,IncluL,IncluR)
%>

document.getElementById("seo_kz_0").value = "<%=mmm%>";document.getElementById("flag_kz_0").innerHTML = "<img src='images/check_right.gif'>";
<%
elseif sl="alexa" then
alexaCldeContent = getHTTPPage("http://data.alexa.com/data/?cli=10&dat=snba&ver=7.0&url="&sw) '要提取页面的url地址
Startsogou=""" TEXT="""
Oversogou="""/>"
mmm=GetBody(alexaCldeContent,Startsogou,Oversogou,IncluL,IncluR)
%>
document.getElementById("seo_alexa_0").value = "<%=mmm%>";document.getElementById("flag_alexa_0").innerHTML = "<img src='images/check_right.gif'> <a href='ranks/pr.php?

website=<%=sw%>' target='_blank'>查看详细</a>";
<%
end if
  Function GetInnerText(strHtml)
  dim regEx
  Set regEx = New RegExp
  regEx.Pattern = "<\/?[^>]*>"
  regEx.Global = True
  相关解决方案