% ac=Request("ac") if ac="go" then Call Dj95_go() else Call Dj95_Main() end if Sub Dj95_main() %>
| 95DJ数据资源入库系统 由 刘杰先生 编写并整合到(ASP 3.0) 如果您还没有以下信息,请先到www.95dj.com登记 |
| <% Set Rs=Conn.Execute(" Select * From [CmsDj_Admin] Where CD_AdminUserName='采集专用-请勿删除' ") If (Rs.eof And Rs.Bof) or Err.number<>0 then '如果不存在 Conn.Execute("insert into [CmsDj_Admin] (CD_AdminUserName,CD_AdminPassWord,CD_LoginIP,CD_Permission) values ('采集专用-请勿删除','无密码无权限','26355','60000')") page="0" else page=Rs("CD_LoginIP") end if Rs.close:Set Rs=nothing Dj95_apido="http://www.95dj.com/api/Api_open_mp4.Do" Dj95All=GetHttpPage(""&Dj95_apido&"") Dj95_page2=GetContent(Dj95All,"","",0) %> www.95dj.com 自动扫描/采集/入库功能 | |
|
|
|
已成功<%=cid%>首, 跳过<%=sid%>首。欢迎使用本插件!永久免费!技术支持QQ:88994785 <% 'Response.Write page2 'Response.end %> <% End Sub FunctIon RE_Dj95(str,start,last,n,m)'过滤取两者间代码 If Instr(lcase(str),lcase(start))>0 Then RE_Dj95=mid(str,1,instr(str,start)-n) + mid(str,instr(str,last)+m,len(str)) '过滤两端之间 else RE_Dj95=str end if End FunctIon FunctIon GetContent(str,start,last,n)'取两者间代码 If Instr(lcase(str),lcase(start))>0 Then Select case n Case 0 '左右都截取(都取前面)(去处关键字) GetContent=Right(str,Len(str)-Instr(lcase(str),lcase(start))-Len(start)+1) GetContent=Left(GetContent,Instr(lcase(GetContent),lcase(last))-1) Case 1 '左右都截取(都取前面)(保留关键字) GetContent=Right(str,Len(str)-Instr(lcase(str),lcase(start))+1) GetContent=Left(GetContent,Instr(lcase(GetContent),lcase(last))+Len(last)-1) Case 2 '只往右截取(取前面的)(去除关键字) GetContent=Right(str,Len(str)-Instr(lcase(str),lcase(start))-Len(start)+1) End select Else GetContent="" End If End FunctIon public function Replacetrim(byval strcontent) '过滤掉字符中所有的tab和回车和换行 on error resume next dim re set re = new regexp re.ignorecase = true re.global = true re.pattern = "(" & chr(8) & "|" & chr(9) & "|" & chr(10) & "|" & chr(13) & ")" strcontent = re.replace(strcontent, vbnullstring) set re = nothing replacetrim = strcontent exit function end function FunctIon GetHttpPage(url) '取网页源码 DIm Http Set Http=Server.Createobject("MSXML2.XMLHTTP") Http.open "GET",url,false Http.send() If Http.readystate<>4 Then ExIt functIon End If GetHTTPPage=bytesToBSTR(Http.responseBody,"GB2312") Set Http=NothIng If err.number<>0 Then err.Clear End FunctIon FunctIon BytesToBstr(body,CSet) DIm objstream Set objstream = Server.CreateObject("adodb.stream") objstream.Type = 1 objstream.Mode =3 objstream.Open objstream.WrIte body objstream.PosItIon = 0 objstream.Type = 2 objstream.CharSet = CSet BytesToBstr = objstream.ReadText objstream.Close Set objstream = NothIng End FunctIon %> <%ConnClose()%> |