[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
  1. Set http = CreateObject("Msxml2.XMLHTTP")
  2. url = "http://www.xiami.com/search/album?key=%E6%B5%AE%E8%BA%81"
  3. http.open "GET",url,False
  4. http.send()
  5. Do Until http.ReadyState = 4 :Wscript.Sleep 100 :Loop
  6. html = http.responseText
  7. Set http = Nothing
  8. With New RegExp
  9.     .Global = true
  10.     .ignoreCase = true
  11.     .Pattern = "title=""浮躁""(.*\r\n){4}.*title=""王菲"""
  12.     For Each match In .Execute(html)
  13.         MsgBox Split(Split(match,vbCrLf)(1),Chr(34))(1)
  14.     Next
  15. End With
复制代码

TOP

貌似也可以这样:
  1. Set http = CreateObject("Msxml2.XMLHTTP")
  2. url = "http://www.xiami.com/search/album?key=%E6%B5%AE%E8%BA%81"
  3. http.open "GET",url,False
  4. http.send()
  5. Do Until http.ReadyState = 4 :Wscript.Sleep 100 :Loop
  6. html = http.responseText
  7. Set http = Nothing
  8. Set re = New RegExp
  9. re.Global = true
  10. re.ignoreCase = true
  11. re.Pattern = "title=""浮躁""[\s\S]*?(http://.*?\.jpg)[\s\S]*?title=""王菲"""
  12. For Each match In re.Execute(html)
  13.       MsgBox match.SubMatches(0)
  14. Next
复制代码

TOP

返回列表