Skip to content

Instantly share code, notes, and snippets.

@compil3
Created May 12, 2020 04:20
Show Gist options
  • Save compil3/55ec131f762584fdd331ead274ac8a13 to your computer and use it in GitHub Desktop.
Save compil3/55ec131f762584fdd331ead274ac8a13 to your computer and use it in GitHub Desktop.
Linq Nodes
IEnumerable<List<string>> table = playerDoc.DocumentNode
.SelectSingleNode($"//*[@id='lg_team_user_leagues-{leagueId}']/div[4]/table/tbody")
.Descendants("tr")
.Skip(1)
.Where(tr => tr.Elements("td").Count() > 1)
.Select(tr => tr.Elements("td").Select(td => td.InnerText.Trim())
.Where(td => td.Contains("Reg")).ToList())
.ToList();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment