以编程方式浏览网站 [英] Programatically navigating a web site

查看:86
本文介绍了以编程方式浏览网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在考虑编写一个可显示图书馆网站上的帐户信息的应用程序.

I am considering writing an app that would display account information from a library web site.

不幸的是,我唯一可以访问的信息是通过他们的网站.

Unfortunately, the only access I have to the information is through their web site.

是否有示例代码显示如何以编程方式浏览网站?我需要点击链接&按钮,填写字段并从页面收集信息.该应用程序的用户永远不会真正看到该网站,而只会看到该信息 我收集了.

Is there any sample code out there showing how to programmatically navigate a web site? I would need to click on links & buttons, fill in fields and collect information from pages. The user of the app would never actually see the web site, just the information I collected.

我知道这种方法不理想.只要有人更改了网站,它就有可能破坏我的代码.

I know this approach is less than ideal. As soon as someone changes the web site it would probably break my code. So any other suggestions would be appreciated.

推荐答案

您可以使用 HttpWebRequest 浏览网站.

You can use HttpWebRequest to walk through a web site.

之前考虑法律后果. 网络抓取(注意:此论坛不支持法律问题).

Consider legal ramifications, before web scraping (caveat: this forum does not support legal questions).

希望这会有所帮助,
标记

Hope this helps,
Mark


这篇关于以编程方式浏览网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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