一个例子:从新浪提取上海天气的vbs |
时间:2012-04-30 13:09:12 来源: 作者:虾谷 |
if instr(wstr,"<img src=images/sina_sh/new/sh24.gif width=172 height=17>")>0 then
wstr=mid(wstr,instr(wstr,"<img src=images/sina_sh/new/sh24.gif width=172 height=17>")+len("<img src=images/sina_sh/new/sh24.gif width=172 height=17>"))
wstr=mid(wstr,instr(wstr,"<table width=160 border=0 cellspacing=0 cellpadding=0>"))
wstr=mid(wstr,1,instr(wstr,"</table>")+len("</table>"))
end if
wstr=replace(wstr,"<tr><td colspan=3 align=right><a href=http://weather.sina.com.cn/>其他城市</a><font color=#015B7B>>></font></td></tr>","")
dim pos1,pos2
pos1=instr(wstr,"<tr>")
pos2=instr(pos1,wstr,"</tr>")
wstr=right(wstr,len(wstr)-pos2-4-4)
wstr=replace(wstr,"</table>","")
wstr=replace(wstr,"width=35","")
wstr=replace(wstr,"width=45","")
wstr=replace(wstr,"width=60","")
'Response.Write wstr
if err.number=0 then
Set f = fs.CreateTextFile(incFilePath & incWeather,true)
2/5 首页 上一页 1 2 3 4 5 下一页 尾页 |
|
|
|