如何创建一个可以与网站交互的win应用程序?
你好 我正在尝试编写一个 Windows 应用程序,它可以读取特定网站的 HTML 内容并在某些输入字段中填写一些数据并提交页面。
到目前为止我所做的就是从 WebBrowser
对象读取页面内容,导航到网站。
我知道我需要创建一些请求/响应变量并使用它们,但我对我想要做什么没有很好的看法。
另外,我关于 HttpRequest 和 HttpResponse 的信息太少了......
Hi
I'm trying to write a windows application which can read HTML content of a specific website and fill some data in some input fields and submit the page.
what I did untill now was reading page content from a WebBrowser
object, navigated to the website.
I know that i need to create some request/response variables and work with them, but I have no good view on what i'm trying to do.
also, my information about HttpRequest
and HttpResponse
is so low...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
HttpWebRequest 是您要查找的内容,示例对于读/写到抓取比比皆是。
WebClient 可能更容易实现,但最终只是上述内容的包装。
HttpWebRequest is what you're looking for, examples for read/write to scrape abound.
WebClient might be simpler for you to implement but in the end is only a wrapper to the above.
您可以尝试使用 HttpWebRequest with https in C# 线程中描述的方法作为起点。
You can try to use the approach described in the HttpWebRequest with https in C# thread as a starting point.