The error I get when running your code:
System.ArgumentException: 'ISO-8559-1' is not a supported encoding name.
It is generated by the standard .NET Framework encoding classes. This means that the page declares an encoding that is not supported by .NET. I fixed it as follows:
var page = new HtmlDocument();
page.OptionReadEncoding = false;
PS: I am using the Html Agility Pack version 1.3
source
share