您好,我有一个脚本,但是当我尝试捕获我需要的信息时,我不能这是我想要获得的 html 代码的一部分:
<div class="pretty-container " >
2100.0
</div>
所以在我的套接字 y 上尝试这样做以获得 2100.0(2100.0 它是一个可变数字):
on *:sockread:foo: {
var %read
sockread %read
if ($regex(%read,<div class="pretty-container " >(.*)<\/div>)) {
echo -s price founded: $regml(1)
; - here i try to catch the 2100.0 number
sockclose $sockname
}
}
但这不起作用我相信这是因为数字和在另一行。请有人帮我解决这个问题?
提前感谢,
卡洛斯