vbs 解析html文档的方法(htmlfile)
关于VBS采集,网上流行比较多的方法都是正则,其实 htmlfile 可以解析 html 代码,但如果 designMode 没开启的话,有时候会包安全提示信息。
但是开启 designMode (@预言家晚报 分享的方法) 的话,所有js都不会被执行,只是干干净净的dom文档,所以在逼不得已的情况下开启 designMode 一般情况保持默认即可。
Set html = CreateObject("htmlfile") Set http = CreateObject("Msxml2.ServerXMLHTTP") html.designMode = "on" ' 开启编辑模式 http.open "GET", "http://www.cnblogs.com/", False http.send strHtml = http.responseText html.write strHtml ' 写入数据 Set post_list = html.getElementById("post_list") For Each el In post_list.children WScript.Echo el.getElementsByTagName("a")(0).innerText Next
其实方法很简单,但是重点是会vbs的,却不一定都会 dom 操作,所以这个很纠结。
我也没办法,只能靠你们自己了,我只是分享一下思路而已、
这样解析 html 比正则方便快捷多了。
iisweb.vbs iis网站管理脚本使用介绍
应用到:WindowsServer2003,WindowsServer2003R2,WindowsServer2003withSP1,WindowsServer2003withSP2Iisweb.vbs:IIS网站管理脚本在运行带有Internet信息服务(IIS)6.0的WindowsServer2003的服
iisvdir.vbs iis虚拟目录管理脚本使用介绍
IIS管理器也是通过调用iisvdir.vbs来实现虚拟目录的创建和删除的。我们可以通过命令行的方式来执行iisvdir.vbs脚本1)创建虚拟目录:cscriptc:windowssystem32
Iiscnfg.vbs IIS 配置脚本
导入和导出本地或远程计算机上Internet信息服务(IIS)配置数据库的所有或选定元素,或者将整个IIS配置(配置数据库和架构)复制到另一台计算机以复制