SoFunction
Updated on 2025-03-07

c# Use htmlgilitypack to parse html format string


 static void Main(string[] args)
        {
            string html = GetHtml("https://");
            HtmlDocument doc = new HtmlDocument();
            (html);
            HtmlNode node = ;
            HtmlNode div = ("//table[@class='dataintable']")[0];
            ();
            ();
        }

        static string GetHtml(string url)
        {

            WebRequest request = (url);
            WebResponse res = ();
            StreamReader sr = new StreamReader((), Encoding.UTF8);
            string html = ();
            ();
            ();
            return html;
        }