在我的默认浏览器中打开新标签,并自动在我的网站中打开几个链接 [英] Open new tab in my default browser and several links inside my site automatically

查看:35
本文介绍了在我的默认浏览器中打开新标签,并自动在我的网站中打开几个链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用以下代码在 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.

这篇关于在我的默认浏览器中打开新标签,并自动在我的网站中打开几个链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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