📄 tool_56.asp
字号:
<!--#include file="check.asp"--><%
Server.Scripttimeout=9999999
Response.Expires = 0
Response.expiresabsolute = Now() - 1
Response.addHeader "pragma", "no-cache"
Response.addHeader "cache-control", "private"
Response.CacheControl = "no-cache"
Response.Buffer = True
Response.Clear
Server.ScriptTimeOut=999999999
'***************************************************************
'* 定义 Function 函数
'***************************************************************
function Geturl(url)
dim Http
set Http=server.createobject("MSXML2.XMLHTTP")
'set Http=server.createobject("Microsoft.Xmlhttp")
Http.open "GET",url,false
Http.send()
if Http.readystate<>4 then
exit function
end if
Geturl=bytesToBSTR(Http.responseBody,"gb2312")
set http=nothing
if err.number<>0 then err.Clear
end Function
Function BytesToBstr(body,Cset)
dim objstream
s="stream"
set objstream = Server.CreateObject("adodb."&s)
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
Function cut(str,start,start_num,over,over_num)'留头不留尾,首尾关键字正向
cut=mid(str,Instr(str,start)+start_num,Instr(str,over)+over_num-Instr(str,start)-start_num)
End Function
Function cut1(str,start,start_num,over,over_num)'留头不留尾,头关键字正向,尾关键字反向
cut1=mid(str,Instr(str,start)+start_num,Instrrev(str,over)+over_num-Instr(str,start)-start_num)
End Function
Function cut2(str,start,start_num,over,over_num)'留头不留尾,头关键字反向,尾关键字正向
cut2=mid(str,Instrrev(str,start)+start_num,Instr(str,over)+over_num-Instrrev(str,start)-start_num)
End Function
Function cut3(str,start,start_num,over,over_num)'留头不留尾,首尾关键字反向
cut3=mid(str,Instrrev(str,start)+start_num,Instrrev(str,over)+over_num-Instrrev(str,start)-start_num)
End Function
%>
<html>
<head>
<title>马克斯小助手-56</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="admin.css" type=text/css rel=stylesheet>
</head>
<body>
<script>
<!--
function Send_Open() {
if (document.form1.maxz.value == "") {
alert("请先填写专辑地址?");
document.form1.maxz.select();
return false;
}
return true;
}
//-->
</script>
<form name="form1" method="post" action="?action=add" onSubmit="return Send_Open();">
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder">
<tr><th colspan="2" align="center" class="tableHeaderText">56.com</td></tr>
<tr><td bgcolor="#FFFFFF" align="center">请输入专辑地址:<input name="maxz" type="text" value="<%=Request("maxz")%>" size="50"></td></tr>
<tr><td align="center" bgcolor="#FFFFFF">示例:http://www.56.com/w26/album-aid-1519334.html</td></tr>
<tr><td align="center" bgcolor="#FFFFFF"><input name="action" type="submit" id="action" value="提交分析该专辑地址"></td></tr>
<tr><td align="center" bgcolor="#FFFFFF"></td></tr>
</table>
</form>
</body>
</html>
<%
'-------------主程序-------------------------------------------------------------------
if Request("action")="add" Then
maxz=request.Form("maxz")
maxz3=Split(maxz,"album")(0)
maxz=Split(maxz,"-aid-")(1)
maxz1=Replace(maxz,".html","")
maxz2=maxz3&"album-p-1_aid-"&maxz1&".html"
v_str=geturl(maxz2)
v_a=Trim(cut(v_str,"(共",2,"个)</h2>",0))
If v_a<=25 Then
v_b=1
Else
If v_a Mod 25<>0 Then
v_b=Int(v_a/25)+1
Else
v_b=Int(v_a/25)
End If
End If
For i=1 To v_b
v_c=geturl(maxz3&"album-p-"&i&"_aid-"&maxz1&".html")
v_d=Split(v_c,"<p class=""videoTitle"">")
For ii=1 To UBound(v_d)
v_e=maxz3&cut(v_d(ii),"<a href=""",9,""" title=",0)
v_f=cut(v_d(ii),"title=""",7,""">",0)
v2_c=geturl(v_e)
If InStr(v2_c,".swf")>0 then
v2_d=cut(v2_c,"http://www.56.com/n_",18,".swf",0)
Else
v2_d= "分析失败,打开地址手动查看-"&Split(v2_a(v2_i),"$")(1)&"<br />"
End If
zt_url=zt_url&v_f&"$"&v2_d&Chr(13)
Next
Next
zt_name=""
%>
<center><form method="post" action="admin_add.asp">
<input type="hidden" name="zt_name" value="<%=zt_name%>" />
<input type="hidden" name="zt_play" value="56" />
共抓取到<font color=#FF0000><strong><%=v_a%></strong></font>个视频<br />
<textarea name="zt_url" rows="15" cols="120"><%=zt_url%></textarea>
<br /><input type="submit" value="修改好了提交" /></form></center>
<%End If %>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -