网页自动化 [英] Web Page Automation

查看:104
本文介绍了网页自动化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我正在尝试从自动化网页中剥离出来.我正在尝试将一个可以传递给任何URL的应用程序放在一起,并从中单击"该页面上的链接.我在VS Express 2008中使用C#进行编码.

EG:
1)Google主题.
2)抓取第1页结果集上的网址列表.
3)一次打开每个页面,然后自动单击每个链接.

这一切都将在没有可见的Web浏览器窗口/框架的背景下发生.

该应用程序必须满足所有类型的页面设计. EG:每个页面都有从其中下载文件的不同方式... JavaScript,重定向,直接链接....

我已经能够到达第2点,在这里我可以抓取html并获得url的列表,而且我已经能够使用webclient下载具有直接链接到文件的页面的文件... .对于确定要处理的网页以实施特定的下载"过程,我仍然有些犹豫.

我在处理脚本化页面时遇到了很大的困难,这些页面中的文件通过Java脚本或重定向来下载.

有人可以帮忙吗?

在此先感谢!!!!

Hi there,

I am trying to do a spin off from automating a webpage. I am trying to put together an application that can be handed any url and from that it can "click" the links on that page. Am coding in C# in VS express 2008.

EG:
1) Google a topic.
2) Grab a list of the url''s on page 1 result set.
3) Open each page one at a time and automate clicking on every link.

This would all happen in the background with no visible web browser window/frame.

The application must cater for all types of page design. EG: Each page could have a different way of downloading a file from it...Javascript, redirecting, direct link....

I have been able to get as far as point 2 where I can scrape the html and get a list of url''s, and I have been able to use a webclient to download files for pages with direct links to the files....I still am a bit shaky on determining what kind of webpage I''m dealing with in order to implement a specific "download" process.

I am having major difficulty dealing with scripted pages where downloading the files comes via a java script or redirect.

Can anyone help please?

Thanks in advance!!!

推荐答案

使用 WatiN [ ^ ].


这篇关于网页自动化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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