I am developing a web scraper that pulls titles of articles from a webpage (http://www.espn.com/college-football/) and it works well, but it only pulls part of the articles, not all of them.
The articles are inside a <section data-everscroll="true">
so I know it stops there.
My question is, how can I gather all the articles from the page, all the way to the bottom. There are 119 total articles.
Disclaimer: I have contacted ESPN and gotten their permission to scrape and use their articles for this project.
static void Main(string[] args)
{
var getHtmlWeb = new HtmlWeb();
var doc = getHtmlWeb.Load("http://www.espn.com/college-football");
var titles = doc.DocumentNode.SelectNodes("//*[@id=\"news-feed\"]/article//section//h1");
foreach (var title in titles)
{
string t = title.InnerText;
Console.WriteLine($"Title: {t}");
}
Console.ReadLine();
}