vbs xmldom初次实战获取QQ签名的代码
程序员文章站
2022-04-29 09:19:56
'/*========================================================================= &nbs...
'/*=========================================================================
' * intro 用xmldom分析qq签名文档
' * filename qq_qianming.vbs
' * author yongfa365
' * version v2.0
' * email yongfa365[at]qq.com
' * madetime 2008-01-22 20:55:25
' * lastmodify 2008-02-22 20:55:25
' *==========================================================================*/
set doc = createobject("microsoft.xmldom")
doc.async = false
doc.load("http://e.cnc.qzone.qq.com/cgi-bin/cgi_emotion_indexcount.cgi?uin=64049027")
set root = doc.documentelement
set node = root.childnodes.nextnode()
wscript.echo "共" & node.text & "条签名信息"
set doc = createobject("microsoft.xmldom")
doc.async = false
doc.load("http://e.cnc.qzone.qq.com/cgi-bin/cgi_emotion_indexlist.cgi?uin=64049027&emotionarchive=-1")
set root = doc.documentelement
wscript.echo "xml根结点名字是:" & root.nodename
set node = root.childnodes.nextnode()
for nodei = 0 to node.childnodes.length -1
set nownode = node.childnodes(nodei)
msg = msg & vbcrlf & "id" & ":" & nownode.attributes.getnameditem("id").text
' msg = msg & vbcrlf & "id" & ":" & nownode.getattribute("id")
msg = msg & vbcrlf & "title" & ":" & nownode.selectsinglenode("title").text
msg = msg & vbcrlf & "pubdate" & ":" & nownode.selectsinglenode("pubdate").text
' msg = msg & vbcrlf & nownode.childnodes(0).nodename & ":" & nownode.childnodes(0).text
' msg = msg & vbcrlf & nownode.childnodes(1).nodename & ":" & nownode.childnodes(1).text
next
wscript.echo msg
' * intro 用xmldom分析qq签名文档
' * filename qq_qianming.vbs
' * author yongfa365
' * version v2.0
' * email yongfa365[at]qq.com
' * madetime 2008-01-22 20:55:25
' * lastmodify 2008-02-22 20:55:25
' *==========================================================================*/
set doc = createobject("microsoft.xmldom")
doc.async = false
doc.load("http://e.cnc.qzone.qq.com/cgi-bin/cgi_emotion_indexcount.cgi?uin=64049027")
set root = doc.documentelement
set node = root.childnodes.nextnode()
wscript.echo "共" & node.text & "条签名信息"
set doc = createobject("microsoft.xmldom")
doc.async = false
doc.load("http://e.cnc.qzone.qq.com/cgi-bin/cgi_emotion_indexlist.cgi?uin=64049027&emotionarchive=-1")
set root = doc.documentelement
wscript.echo "xml根结点名字是:" & root.nodename
set node = root.childnodes.nextnode()
for nodei = 0 to node.childnodes.length -1
set nownode = node.childnodes(nodei)
msg = msg & vbcrlf & "id" & ":" & nownode.attributes.getnameditem("id").text
' msg = msg & vbcrlf & "id" & ":" & nownode.getattribute("id")
msg = msg & vbcrlf & "title" & ":" & nownode.selectsinglenode("title").text
msg = msg & vbcrlf & "pubdate" & ":" & nownode.selectsinglenode("pubdate").text
' msg = msg & vbcrlf & nownode.childnodes(0).nodename & ":" & nownode.childnodes(0).text
' msg = msg & vbcrlf & nownode.childnodes(1).nodename & ":" & nownode.childnodes(1).text
next
wscript.echo msg