WebClient DownloadString(Url) com strange characters

  • Thread starter Thread starter StockCanadian
  • Start date Start date
S

StockCanadian

Guest
Hello,

I trying to get the source code of a page. Until yesterday, it was working.

using (System.Net.WebClient client = new System.Net.WebClient())
{
string Url= "https://fnet.bmfbovespa.com.br/fnet/publico/exibirDocumento?id=66464#toolbar=0";
client.Headers["User-Agent"] = "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.12) Gecko/20100824 Firefox/3.5.12x";
client.Encoding = Encoding.UTF8;
Console.WriteLine(client.DownloadString(Url));
}

But the site has done a maintenance and, after that, it is not working anymore. The output now is strange characters: "PGh0bWw+CjxoZWFkPgo8TUVUQSBodHRwLWVxdWl2PSJ...

I searched about encoding/decoding but without success. Anyone can help me?

Thank you.

Continue reading...
 
Back
Top