📄 admin_load_viewid.asp
字号:
<% if TitleTypes=1 then
if TsType=1 then
TsType=true
elseif TsType=0 then
TsType=False
end if
if ToType=1 then
ToType=true
elseif ToType=0 then
ToType=False
end if
TitleCode=GetArray(ListCode,TsString,ToString,TsType,ToType)
if TitleCode<>"$False$" Then
TitleTest=Split(TitleCode,"$Array$")
For Testi=0 To Ubound(TitleTest)
If TitleType1=1 Then
if TsType1=1 then
TsType1=true
elseif TsType1=0 then
TsType1=False
end if
if ToType1=1 then
ToType1=true
elseif ToType1=0 then
ToType1=False
end if
TitleTest(Testi)=GetBody(TitleTest(Testi),TsString1,ToString1,TsType1,ToType1)
If TitleTest(Testi)="$False$" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>从目录页获取章节标题 - 在修正章节标题时出错:<a target=_blank href=" & ListUrl & "><font color='red'>" & ListUrl & "</font></a></li>"
End if
End if
Next
Else
FoundErr=True
ErrMsg=ErrMsg & "<br><li>从目录页获取章节标题 - 在截取章节标题时出错:<a target=_blank href=" & ListUrl & "><font color='red'>" & ListUrl & "</font></a></li>"
end if
TitleCode=""
End If
If FoundErr=True Then
Call WriteErrMsg(ErrMsg)
FoundErr=False
ErrMsg=""
Else
if HsType=1 then
HsType=true
elseif HsType=0 then
HsType=False
end if
if HoType=1 then
HoType=true
elseif HoType=0 then
HoType=False
end if
NewsArrayCode=GetArray(ListCode,HsString,HoString,HsType,HoType)
If NewsArrayCode="$False$" Then
response.Write "<br><li><font color='red'>从目录页获取章节连接/章节ID - 在截取章节连接/章节ID时出错:<a target=_blank href=" & ListUrl & "><font color='red'>" & ListUrl & "</font></a></font></li><br>"
Else
NewsArray=Split(NewsArrayCode,"$Array$")
NewsArrayCode=""
For Testi=0 To Ubound(NewsArray)
If HUrlType1=1 Then
if HsType1=1 then
HsType1=true
elseif HsType1=0 then
HsType1=False
end if
if HoType1=1 then
HoType1=true
elseif HoType1=0 then
HoType1=False
end if
NewsArray(Testi)=GetBody(NewsArray(Testi),HsString1,HoString1,HsType1,HoType1)
If NewsArray(Testi)="$False$" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>从目录页获取章节连接/章节ID - 在修正章节连接/章节ID时出错:<a target=_blank href=" & ListUrl & "><font color='red'>" & ListUrl & "</font></a></li>"
End if
End if
If HttpUrlType=1 Then
NewsArray(Testi)=Replace(HttpUrlStr,"{$ID$}",NewsArray(Testi))
NewsArray(Testi)=Replace(NewsArray(Testi),"{$Bl_id$}",bl_id)
Else
NewsArray(Testi)=DefiniteUrl(NewsArray(Testi),ListUrl)
End If
Next
If FoundErr=True Then
Call WriteErrMsg(ErrMsg)
FoundErr=False
ErrMsg=""
Else
'-----------------------------------------------------------------------------------------
'章节内容页面获取开始
'-----------------------------------------------------------------------------------------
response.Write "共有 <font color='red'>"&Ubound(NewsArray)+1&"</font> 个章节<br>"
For Viewi=0 To Ubound(NewsArray)
ReadBook_Path=NewsArray(Viewi)
NewsCode=GetHttpPage(NewsArray(Viewi),EquivType)
If NewsCode="$False$" Then
response.Write "<br><li>在获取章节内容页源码时发生错误:<a target=_blank href="& NewsArray(Viewi) &"><font color='red'>"& NewsArray(Viewi) &"</font></a></li><br>"
Else
NewsCode=GetBody(NewsCode,VsString,VoString,True,True)
If NewsCode="$False$" Then
response.Write "<br><li>在截取章节内容页时发生错误:<a target=_blank href=" & NewsArray(Viewi) & "><font color='red'>"& NewsArray(Viewi) &"</font></a></li><br>"
Else
If cookType=1 Then
if cosType=1 then
cosType=true
elseif cosType=0 then
cosType=False
end if
if cooType=1 then
cooType=true
elseif cooType=0 then
cooType=False
end if
cook=GetBody(NewsCode,cosString,cooString,cosType,cooType)
If cook="$False$" then
cook="正文"
Else
If cookType1=1 Then
if cosType1=1 then
cosType1=true
elseif cosType1=0 then
cosType1=False
end if
if cooType1=1 then
cooType1=true
elseif cooType1=0 then
cooType1=False
end if
cook1=GetBody(cook,cosString1,cooString1,cosType1,cooType1)
If cook1="$False$" then
cook="正文"
cook1=""
else
cook=cook1
cook1=""
End If
end if
End If
ElseIf cookType=2 Then
cook=cookStr
ElseIf cookType=0 Then
cook="正文"
End If
If cook="$False$" or cook="" Then
cook="正文"
else
cook=GetTextFromHtml(cook)
End If
set rsc1=server.createobject("adodb.recordset")
if IsSqlDataBase = 2 then
sqlc1="select cook_viewid from list_cook where list_bookid="&book_id&" order by cook_viewid desc limit 1"
else
sqlc1="select top 1 cook_viewid from [list_cook] where list_bookid="&book_id&" order by cook_viewid desc"
end if
rsc1.open sqlc1,conn,1,1
if rsc1.bof and rsc1.eof then
c_viewid=1
else
c_viewid=rsc1("cook_viewid") + 1
end if
rsc1.close
set rsc1=nothing
set rsc=server.createobject("adodb.recordset")
if IsSqlDataBase = 2 then
sqlc="select list_cookid,list_cookname,classid,list_bookid,cook_viewid from list_cook where list_bookid="&book_id&" and list_cookname='"&cook&"' limit 1"
else
sqlc="select top 1 list_cookid,list_cookname,classid,list_bookid,cook_viewid from [list_cook] where list_bookid="&book_id&" and list_cookname='"&cook&"'"
end if
rsc.open sqlc,conn,1,3
if rsc.bof and rsc.eof then
rsc.addnew
rsc("list_cookname")=cook
rsc("classid") = classid
rsc("list_bookid")=book_id
rsc("cook_viewid") = c_viewid
rsc.update
response.Write "<br><font color='blue'><B>新卷集:</B></font> "&cook&" → <font color='blue'>添加成功</font><br>"
rsc.close
rsc.open sqlc,conn,1,1
list_cookid=rsc("list_cookid")
rsc.close
else
list_cookid=rsc("list_cookid")
rsc.close
end if
set rsc=nothing
If TitleTypes=0 Then
if TsType=1 then
TsType=true
elseif TsType=0 then
TsType=False
end if
if ToType=1 then
ToType=true
elseif ToType=0 then
ToType=False
end if
Title=GetBody(NewsCode,TsString,ToString,TsType,ToType)
If Title="$False$" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>从章节页获取章节标题 - 在截取章节标题的时候发生错误:<a href=" & NewsArray(Viewi) & " target=_blank><font color='red'>" & NewsArray(Viewi) & "</font></a></li>"
Else
If TitleType1=1 Then
if TsType1=1 then
TsType1=true
elseif TsType1=0 then
TsType1=False
end if
if ToType1=1 then
ToType1=true
elseif ToType1=0 then
ToType1=False
end if
Title1=GetBody(Title,TsString1,ToString1,TsType1,ToType1)
If Title1="$False$" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>从章节页获取章节标题 - 在修正章节标题的时候发生错误:<a href=" & NewsArray(Viewi) & " target=_blank><font color='red'>" & NewsArray(Viewi) & "</font></a></li>"
Title1=""
Else
Title=Title1
Title1=""
end if
end if
end if
If Title<>"$False$" and Title<>"" Then
Title=GetTextFromHtml(Title)
if Title="" Then
Title="空标题"
end if
End If
Elseif TitleTypes=1 Then
Title=GetTextFromHtml(TitleTest(Viewi))
if Title="" Then
Title="空标题"
end if
Else
FoundErr=True
ErrMsg=ErrMsg & "<br><li>章节标题获取参数错误,请重新设计采集规则!</li>"
End If
if CsType=1 then
CsType=true
elseif CsType=0 then
CsType=False
end if
if CoType=1 then
CoType=true
elseif CoType=0 then
CoType=False
end if
Content=GetBody(NewsCode,CsString,CoString,CsType,CoType)
If Content="$False$" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>在截取章节正文的时候发生错误:<a href=" & NewsArray(Viewi) & " target=_blank><font color='red'>" & NewsArray(Viewi) & "</font></a><br>"
Else
If ContType1=1 Then
if CsType1=1 then
CsType1=true
elseif CsType1=0 then
CsType1=False
end if
if CoType1=1 then
CoType1=true
elseif CoType1=0 then
CoType1=False
end if
Content1=GetBody(Content,CsString1,CoString1,CsType1,CoType1)
If Content1="$False$" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>在修正章节正文的时候发生错误:<a href=" & NewsArray(Viewi) & " target=_blank><font color='red'>" & NewsArray(Viewi) & "</font></a><br>"
Content1=""
Else
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -