21
1
// @nuget: HtmlAgilityPack
2
3
using System;
4
using System.Xml;
5
using HtmlAgilityPack;
6
7
public class Program
8
{
9
public static void Main()
10
{
11
var html = @"https://fxlabtinystar.cn";
12
13
HtmlWeb web = new HtmlWeb();
14
15
var htmlDoc = web.Load(html);
16
17
var node = htmlDoc.DocumentNode.SelectSingleNode("//head/title/text()");
18
19
Console.WriteLine("Node Name: " + node.Name + "\n" + node.OuterHtml);
20
}
21
}
Cached Result