HttpBrowserCapabilities.Crawler财产.NET财产、HttpBrowserCapabilities、Crawler、NET

2023-09-03 02:36:04 作者:心跳多久丶就爱你多久

如何进行HttpBrowserCapabilities.Crawler属性(http://msdn.microsoft.com/en-us/library/aa332775(VS.71).aspx)工作的?我需要检测合作伙伴的定制履带并且此属性返回false。

How does the HttpBrowserCapabilities.Crawler property (http://msdn.microsoft.com/en-us/library/aa332775(VS.71).aspx) work? I need to detect a partner's custom crawler and this property is returning false.

在哪里/我如何添加他的用户代理,以使此属性将返回true?创建自己的用户代理检测机构以外的任何其他方式?

Where/How can I add his user agent so that this property will return true? Any other way outside of creating my own user agent detecting mechanism?

推荐答案

这是所有的带动下,默认的browserCaps声明的是.NET Framework的一部分。

This is all driven by the default browsercaps declarations that are part of the .NET framework.

要设置这个特定的履带,则需要自定义的browserCaps部分添加到您的web.config文件,以确定它作为一个履带式。

To setup this specific crawler, you would need to add a custom browserCaps section to your web.config to identify it as a crawler.

在如何去这样做的MSDN文档是pretty的有据可查的,在这里是一个链接。

The MSDN documentation on how to go about this is pretty well documented, here is a link.

 
精彩推荐
图片推荐