I have written code that uses HtmlAgilityPack to get the ids and xpaths given the URL. I want to use that code but the website that I want to use it on only has one URL. Basically, content in the website changes but the URL does not. So I can get to all the pages I want to get to but how do you download the HTML source for that page without using the URL in C#?
internal Dictionary<string, string> GetIDsAndXPaths(string url)
{
var web = new HtmlWeb();
var webidsAndXPaths = new Dictionary<string, string>();
var doc = web.Load(url);
var nodes = doc.DocumentNode.SelectNodes("//*[@id]");
if (nodes == null) return webidsAndXPaths;
// more code to get ids and such
return webidsAndXPaths;
}