jamietre / CsQuery

CsQuery is a complete CSS selector engine, HTML parser, and jQuery port for C# and .NET 4.
Other
1.15k stars 249 forks source link

Timeout is not respected #77

Closed yilativ closed 11 years ago

yilativ commented 11 years ago

I'm looking to parse through the following link: http://www.sephora.com/gentle-shampoo-P280568?skuId=1270065

and I set my timeout to 2 seconds, and it does not time out till much later (well past 2 seconds).

My code is simple:

var u = "http://www.sephora.com/gentle-shampoo-P280568?skuId=1270065";
var ServerConfig = new ServerConfig  
{  
TimeoutSeconds = 2,  
UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11"   
};
var result = CQ.CreateFromUrl(u, ServerConfig);

Any suggestions? Thanks for this, very valuable!

jamietre commented 11 years ago

Just pushed a fix.

yilativ commented 11 years ago

That did the trick!