-
-
Save rvvvt/333e4a67c2324db90edd83bf48a43aae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void Scrape() | |
{ | |
var scraper = new HtmlWeb(); | |
var page = scraper.Load("https://vainolo.z14.web.core.windows.net/WebScraping.html"); | |
var nodes = page.DocumentNode.Descendants().SkipWhile(e => e.Id != "Techniques").Skip(1).TakeWhile(e => e.Name != "h2"); | |
foreach (var currNode in nodes) | |
{ | |
if(currNode.GetClasses().Contains("mw-headline")) | |
{ | |
var headline = currNode.InnerText; | |
Console.WriteLine(headline); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment