在我的默认浏览器中打开新标签,并自动在我的网站中打开几个链接

问题描述:

我正在使用以下代码在 Internet Explorer 中打开站点

i'm using the following code to open site in internet explorer

ProcessStartInfo startInfo = new ProcessStartInfo
{
  Arguments = "http://www.cnn.com",
  FileName = "C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe",
  RedirectStandardInput = true,
  UseShellExecute = false
};

System.Diagnostics.Process process = System.Diagnostics.Process.Start(startInfo);

在网页启动后,我希望每隔几秒钟就打开(自动)网页内的链接,而无需在 URL 之前定义(如网络爬虫),可以这样做吗?

after the web page start i want every few seconds to open (automatically) links inside the web page without to define before the URLs (like web crawler), it's possible to do it ?

我不这么认为,因为你在程序的不同进程中打开浏览器,它已经不受你的控制了.如果您在程序中使用 WebBrowser Control,阅读文档并找到带有正则表达式之类的 URL.

I don't think so, because you open the browser in different process of your program and it already out of your control. It could be possible if you use WebBrowser Control in your program, read document and find the URLs with something like regular expression.