Files
WebScrapeApp/CsharpCorne/Program.cs
2021-08-02 12:41:02 +02:00

24 lines
761 B
C#

using HtmlAgilityPack;
using System;
using System.Linq;
namespace CsharpCorner
{
class Program
{
static void Main(string[] args)
{
var web = new HtmlWeb();
// var doc = web.Load("https://www.avanza.se/aktier/lista.html");
var doc = web.Load("https://www.finansportalen.se/aktiekurser/");
// var doc = web.Load("http://www.yellowpages.com/search?search_terms=Software&geo_location_terms=Sydney2C+ND");
// //*[@id="shareslist"]/table/tbody
// //*[@id="shareslist"]/table/tbody/tr[4]/td[1]/a
var headerNames = doc.DocumentNode
.SelectNodes("//*[@id='shareslist']/table/tbody/tr[1]/td[1]/a")
.ToList();
}
}
}