做一个EXE应用程序,实时监控网页中某个变动的数据

2025-02-24 16:27:19
推荐回答(2个)
回答1:

webbrowser.document.body.innerhtml 或者innertext 等。提取网页所有内容。然后用字符串处理函数。进行筛选。这些如果用正则表达式也可以。不过没那么个必要。
mid 字符串处理提取
instr 检查制定字符是否在其中
left right 取左右字符
利用这些函数。就可以提取想要的。等回来再给你一个简单的例子就可以看懂了。

回答2:

其实不用exe,vbs脚本就足够了
set c=createobject("xmlhttp.microsoft")
get "http://shop.5173.com/Default.aspx?uid=US09031791241121-03DB"
sub get(url)
c.open"post",url,0
c.send
if c.readystate=4 then
if v and v<>c.responseText then
msgbox "有变化"
v=c.responseText
end if
wscript.sleep 5*60*1000
get url
end if
end sub