如何从网站获取特定信息并将其显示在框中?
我是 AutoIT 的新手,我已经做了很多事情。
但我找不到从 div
或其他内容之间的网站读取特定信息的方法。如果那不可能,也许有办法从网站读取原始 *.txt(或 php)
文件?
I am quite newbie on AutoIT, I've done alot of things already.
But I can't find out the way to read specific information from the website that is between div
or something. If thats not possible, maybe there is a way to read a raw *.txt(or php)
file from the website?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以为您的 URL 使用以下代码示例:
您要求提供“原始文本”,最好使用属性
innerText
来读取该文本。有关详细信息,请参阅 MSDN。此示例基本上打开一个具有给定 URL 的新 IE 窗口。然后它提取所有
div
元素并在循环中迭代它们。一旦className
为“content-container”
,该元素的内容将显示在消息框中。最后IE窗口再次关闭。您可以在
_IECreate()
函数中添加参数, 0, 0
来最终隐藏浏览器窗口。您可以使用以下两行,而不是搜索此处所示的特定
You can use the following code example for your URL:
You asked for the "raw Text", which is best read with the attribute
innerText
. See MSDN for more details.This example basically opens a new IE window with the given URL. Then it extracts all the
div
-Elements and iterates through them in a loop. Once theclassName
is"content-container"
the content of this element is displayed in a message box. Finally the IE window is closed again.You could add the parameters
, 0, 0
to the_IECreate()
function to hide the browser window in the end.Instead of searching for a specific
<div>
-Element as shown here you could just use the following two lines...