简体   繁体   English

如何使用代理网站查看C#中的其他网站?

[英]How to use a proxy website to view some other websites in C#?

Suppose several websites are filtered in my region, and in order to get some specific information on that pages, i need to use a proxy website such as ( Thisone ) to bypass the filtering. 假设在我的区域中过滤了几个网站,并且为了获得该页面上的某些特定信息,我需要使用代理服务器网站(例如( Thisone ))绕过过滤。
How can i send my URL to these kind of sites and get the result? 如何将我的URL发送到此类网站并获得结果?
How can i search in the resulting content for specific term or object (image, flash, etc)? 如何在结果内容中搜索特定的术语或对象(图像,闪光灯等)?

It looks like the site you mentioned does not provide any API of any kind that you can call from C#. 您提到的站点似乎没有提供可从C#调用的任何类型的API。 Probably your best option is to automate manual entry of the url using a tool like Selenium or Watin . 最好的选择可能是使用SeleniumWatin之类的工具来自动手动输入URL。

The WebClient and WebBrowser components in .NET automatically use the system Internet Explorer network and proxy settings (set via the Control Panel > Internet). .NET中的WebClientWebBrowser组件自动使用系统Internet Explorer网络和代理设置(通过“控制面板”>“ Internet”进行设置)。 If you set them there then you're all set. 如果将它们设置在那里,那么一切都准备就绪。

If you use WebBrowser I don't know (off my head) if you can manually override the proxy settings, but with WebClient you set the WebClient.Proxy property. 如果您使用WebBrowser我不知道(可以说)是否可以手动覆盖代理设置,但是使用WebClient可以设置WebClient.Proxy属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM