📄 xw.asp
字号:
<%
On Error Resume Next
Server.ScriptTimeOut=9999999
Function getHTTPPage(Path)
t = GetBody(Path)
End function
function getHTTPPage(url)
dim Http
set Http=server.createobject("Microsoft.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate<>4 then
exit function
end if
getHTTPPage=bytesToBSTR(Http.responseBody,"utf-8")
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
%>
<%
Dim Url,Html,start,over,body,wap,wstr,str
Url="http://news2.3g.net.cn/index.aspx?wid=21121"
wstr=getHTTPPage(url)
start=Instr(wstr,"【今日热点】")
over=Instr(wstr,"国内")
body=mid(wstr,start,over-start)
'------------------------------------------------
body = replace(body,"<p align=""left"">","")
body = replace(body,"<p align=""center"">","")
body = replace(body,"</p>","")
body = replace(body,"<p>","")
body = replace(body,"upload/","http://news2.3g.net.cn/upload/")
body = replace(body,".aspx",".asp")
body = replace(body,"】","")
body = replace(body,"【","")
body = replace(body,"imglist.asp","/xt/new/imglist.asp")
body = replace(body,"news.asp","/xt/new/news.asp")
body = replace(body,"newstimelist.asp","/xt/new/newstimelist.asp")
body = replace(body,"news_guonei.asp?wid=21121","")
body = replace(body,"more.asp?ftp=7&stp=17&wid=21121","")
body = replace(body,"今日热点","===今日关注===")
body = replace(body,"more.asp?ftp=7&stp=18&wid=21121","")
body = replace(body,"newsorderlist.asp","/xt/new/newsorderlist.asp")
body = replace(body,"<a href=""Joke_search.asp?sid=&wid=2286"">站内搜索>></a><br/>","")
body = replace(body,"<a href=""index.asp?sid=&wid=2286&waped=2"">切换到""2.0版""</a><br/>","")
body = replace(body,"<a href=""index.asp?sid=&wid=2286&waped=1"">切换到""1.0版""</a><br/>","")
'--------------------------------------------------
Response.write body
%></a>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -