Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HtmlWeb.Load not work correct #454

Open
Risbot opened this issue Nov 4, 2021 · 4 comments
Open

HtmlWeb.Load not work correct #454

Risbot opened this issue Nov 4, 2021 · 4 comments
Assignees

Comments

@Risbot
Copy link

Risbot commented Nov 4, 2021

Here is what to include in your request to make sure we implement a solution as quickly as possible.

1. Description

I can not parse web https://www.seznam.cz using HtmlWeb I see unreadable html content, because I get compresed content. In header of the response I see this:

TransferEncoding: {chunked}
TransferEncodingChunked: true

2. Fiddle or Project

https://dotnetfiddle.net/UpHU4w

@JonathanMagnan JonathanMagnan self-assigned this Nov 5, 2021
@JonathanMagnan
Copy link
Member

Hello @Risbot ,

Thank you for reporting, we will look to add an option for the decompression. We quickly tested it with your page and it worked.

Best Regards,

Jon


Sponsorship
Help us improve this library

Performance Libraries
context.BulkInsert(list, options => options.BatchSize = 1000);
Entity Framework ExtensionsBulk OperationsDapper Plus

Runtime Evaluation
Eval.Execute("x + y", new {x = 1, y = 2}); // return 3
C# Eval FunctionSQL Eval Function

@JonathanMagnan
Copy link
Member

Hello @Risbot ,

The v1.11.38 has been released.

We added the option HtmlWeb.AutomaticDecompression in this version.

You can use this option this way:

 var html = @"https://www.seznam.cz/";
HtmlWeb web = new HtmlWeb();
web.AutomaticDecompression = DecompressionMethods.GZip;
var htmlDoc = web.Load(html);
var t = htmlDoc.DocumentNode.InnerHtml;

Let me know if everything is now working for your scenario.

Best Regards,

Jon

@Risbot
Copy link
Author

Risbot commented Nov 10, 2021

Hello @JonathanMagnan thank you for your great work. Now it work good.

@JonathanMagnan
Copy link
Member

Awesome @Risbot !

Don't hesitate to contact us with any questions, issues, or assistance!

Bets Regards,

Jon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants