在Visual Basic中从网页检索数据 [英] Retrieving Data from Web Page in Visual Basic

查看:95
本文介绍了在Visual Basic中从网页检索数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual Basic中,是否有一种方法可以从完全使用JavaScript和HTML生成的网页中提取一段数据(例如,数字)?我想为我的应用程序创建一种在Internet上查找更新的方法,并且想知道这是否是一种很好的方法.

Is there a way, in Visual Basic, to pull a piece of data (for example, a number) from a webpage that is generated entirely with JavaScript and HTML? I want to create a way for my application to find updates on the internet, and I want to find out if this is a good way to do it.

推荐答案

此称为 Web抓取,请参阅: http://en.wikipedia.org/wiki/Web_scraping [^ ].

使用.NET,您需要使用类System.Net.HttpWebRequest,请参见:
http://msdn.microsoft.com/en-us/library/system.net. httpwebrequest.aspx [ ^ ].

在此处查看一些代码示例:
http://msdn.microsoft.com/en-us/library/system.net. webrequest.aspx [ ^ ].

—SA
This is called Web scraping, please see: http://en.wikipedia.org/wiki/Web_scraping[^].

With .NET, you need to use the class System.Net.HttpWebRequest, please see:
http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.aspx[^].

See some code sample here:
http://msdn.microsoft.com/en-us/library/system.net.webrequest.aspx[^].

—SA


这篇关于在Visual Basic中从网页检索数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆