C# htmlagility pack, capturing redirct
See the question and my original answer on StackOverflowUsing the HtmlWeb class that comes with the Html Agility Pack, you can tweak the request before it's actually executed, like this:
HtmlWeb web = new HtmlWeb();
web.PreRequest = OnPreRequest;
HtmlDocument doc = web.Load("http://wwwblablahh.com");
private static bool OnPreRequest(HttpWebRequest request)
{
request.AllowAutoRedirect = true;
return true;
}