using HtmlAgilityPack;
using System;
using [Link];
using [Link];
using [Link];
using [Link];
namespace PriceChecker_
{
class Program
{
static void Main(string[] args)
{
HttpClient httpClient = new HttpClient();
[Link] = new Uri("[Link]
[Link](@"Accept", "text/html,
application/xhtml+xml");
[Link]("Accept-Encoding", "gzip");
[Link]("Accept-Language", "en-
US,en;q=0.9");
[Link]("User-Agent", "Mozilla/5.0
(Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/88.0.4324.146 Safari/537.36");
var result = [Link]("url of item");
var response = [Link];
var compdata = [Link]().Result;
var databytes = Decompress(compdata);
var data = [Link](databytes);
HtmlDocument pageDocument = new HtmlDocument();
[Link](data);
[Link]("Hello World!");
}
static byte[] Decompress(byte[] gzip)
{
// Create a GZIP stream with decompression mode.
// ... Then create a buffer and write into while reading from the
GZIP stream.
using (GZipStream stream = new GZipStream(new MemoryStream(gzip),
[Link]))
{
const int size = 4096;
byte[] buffer = new byte[size];
using (MemoryStream memory = new MemoryStream())
{
int count = 0;
do
{
count = [Link](buffer, 0, size);
if (count > 0)
{
[Link](buffer, 0, count);
}
}
while (count > 0);
return [Link]();
}
}
}
}
}