using System.Collections.Generic;
public static void Main()
var htmlPrinter = new HtmlPrinter();
htmlPrinter.PrintHtml("https://google.com/");
private readonly Dictionary<string, string> _cache = new Dictionary<string, string>();
public void WebReq(string url){
var request = WebRequest.Create(url);
using (var response = (HttpWebResponse)request.GetResponse())
using (var stream = response.GetResponseStream())
using (var reader = new StreamReader(stream))
html = reader.ReadToEnd();
public void CachHTML(string url){
if (!_cache.TryGetValue(url, out string html))
public void PrintHtml(string url)