dags att checka in

This commit is contained in:
2021-08-02 12:41:02 +02:00
parent 5648effc9a
commit 668659bf20
34 changed files with 1092 additions and 5 deletions

25
AngleSharpTest/Program.cs Normal file
View File

@ -0,0 +1,25 @@
using AngleSharp;
using System.Threading.Tasks;
using System;
using System.Linq;
namespace AngleSharpTest
{
class Program
{
static async Task Main(string[] args)
{
var config = Configuration.Default.WithDefaultLoader();
var address = "https://en.wikipedia.org/wiki/List_of_The_Big_Bang_Theory_episodes";
var context = BrowsingContext.New(config);
var document = await context.OpenAsync(address);
var cellSelector = "tr.vevent td:nth-child(3)";
var cells = document.QuerySelectorAll(cellSelector);
var titles = cells.Select(m => m.TextContent);
foreach (var title in titles)
{
Console.WriteLine(title.ToString()); ;
}
}
}
}