图片采集

采集者 | (*)
要写入分类的id号 | (*)

<% on error resume next Server.Scripttimeout=9999999 dim cjz,dc dc=Trim(request("dc")) dc=cINT(dc) cjz=Trim(request("cjz")) uuu="" if dc<>"" then uuu="6642.com/" end if dim a,tp,d,e,mane,url,f,g,zu,ttt ttt=0 a=GetContent(GetFileText("http://"&uuu),"","梦幻景色 - 更多美图",0) Set objRegExp = New Regexp'设置配置对象 objRegExp.IgnoreCase = True objRegExp.Global = True objRegExp.Pattern = "/Html/Image1681688/.+?.jpg" Set Matches=objRegExp.Execute(a) For Each Match in Matches tp="http://6642.com/"&match.value url=GetContent(match.value,"/Html/Image1681688/",".jpg",0)&".htm" name=GetContent(GetFileText("http://6642.com/Disp/"&url),"","",0) Set objRegExp1 = New Regexp'设置配置对象 objRegExp1.IgnoreCase = True objRegExp1.Global = True f="" g="" objRegExp1.Pattern = "http://.+?jpg" Set Match1es=objRegExp1.Execute(GetFileText("http://6642.com/Disp/"&url)) For Each Match1 in Match1es g= match1.value f=f&g next Set Match1es=nothing Set objRegExp1 = nothing dim pass pass=0 sql1="select * from pic where pic_name='"&trim(replace(name,"漂漂美术馆 - ",""))&"'" set rs1=conn.execute(sql1) if rs1.eof and rs1.bof then pass=1 end if rs1.close set rs1=nothing if name<>"" and pass=1 then 'response.write replace(f,"http:","|http:") sql="select * from pic" set rs=server.createobject("adodb.recordset") rs.open sql,conn,1,3 rs.addnew rs("pic_name")=trim(replace(name,"漂漂美术馆 - ","")) rs("piccat_id")=dc rs("pic_url")="未知" rs("pic_spic")=tp rs("pic_pic")=GetContent(f,"http://","jpg",1) rs("pic_desc")="版权没有，盗版不究." if ttt<10 then rs("isbest")=1 else rs("isbest")=0 end if rs("tjuser")=cjz rs("pic_pic1")=replace(replace(f,"http:","|http:"),"|"&rs("pic_pic"),"") rs.update ttt=ttt+1 rs.close set rs=nothing end if next Set Matches=nothing Set objRegExp = nothing if ttt>0 then Response.Write"
采集完成！总共更新"&ttt& "张图片
" end if %>