[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
vbs
  1. If LCase(Right(WSH.FullName, 11)) = "wscript.exe" Then
  2.     CreateObject("WScript.Shell").run "%Comspec% /c cscript -nologo """ & WSH.ScriptFullName & """&pause"
  3.     WSH.Quit
  4. End If
  5. Set html = CreateObject("htmlfile")
  6. Set http = CreateObject("Msxml2.ServerXMLHTTP")
  7. url="http://www.yssm.org/uctxt/109/109767/"
  8. html.designMode = "on"
  9. http.open "GET", url, False
  10. http.send
  11. htmltext = http.responseText
  12. rem 提取内容有两种方法,一种是正则,另一种解析DOM
  13. rem 排除方法有两种,一种是判断a标签的style属性,另一种是匹配标题,如第xx章
  14. html.write htmltext
  15. s="":Set list = html.getElementsByTagName("dd")
  16. For Each item in list
  17.     Set a=item.getElementsByTagName("a")(0)
  18.     If a.getAttribute("style") ="" Then
  19.         s=s & url & split(a.getAttribute("href"),":")(1) & _
  20.             "  " & item.innerText & vbCrLf
  21.     End If
  22. Next
  23. WSH.echo s
复制代码
1

评分人数

TOP

返回列表