Ejemplo n.º 1
0
 public static IEnumerable <T> Links <T>(this ParsedHtml self, Func <string, HtmlObject, T> selector)
 {
     return
         (from a in self.QuerySelectorAll("a[href]")
          let href = a.GetAttributeValue("href")
                     where !string.IsNullOrWhiteSpace(href)
                     select selector(self.TryBaseHref(href), a));
 }
Ejemplo n.º 2
0
 public static IEnumerable <HtmlObject> Tables(this ParsedHtml self, string selector) =>
 from e in self.QuerySelectorAll(selector ?? "table")
     where "table".Equals(e.Name, StringComparison.OrdinalIgnoreCase)
 select e;