SHARE
TWEET

Untitled

a guest Jun 25th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var w = new HtmlWeb();
  2. var doc = w.Load(leagueLink.Text);
  3. if (leagueLink.Text != String.Empty)
  4. {
  5.      //var date = doc.DocumentNode.SelectNodes("//div[@class='cell__content u-w64']");
  6.     //var teamNode = doc.DocumentNode.SelectSingleNode("//h3[@class='h-center']");
  7.     var teams = doc.DocumentNode.Descendants("div").Where(node => node.GetAttributeValue("class", "").Equals("js-event-list-tournament-events")).ToList();
  8.     if (teams != null)
  9.     {
  10.          var team = teams.Select(node => node.InnerText);
  11.          Console.WriteLine(team);
  12.     }
  13.     else MessageBox.Show("null");
  14. }
  15. else MessageBox.Show("Please enter a league link");
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top