public static void AddSpfContent(this HtmlNode node, JObject result) { var spfAttribute = node.Attributes["spf-content"]; if (spfAttribute == null) { return; } result.AppendNodePath(spfAttribute.Value, node.OuterHtml); }
public static void AddSpfAttr(this HtmlNode node, JObject result) { var spfAttribute = node.Attributes.Where(i => i.Name.ToLower().StartsWith("spf-attr-")); if (!spfAttribute.Any()) { return; } var id = node.GetSpfPartialAttr() ?? node.Id; foreach (var attr in spfAttribute) { var name = attr.Name.TrimStart("spf-attr-"); var path = $"attr/{id}/{name}"; result.AppendNodePath(path, attr.Value); } }