This commit is contained in:
17
docs/snippets/csharp/config/parse_links.cs
Normal file
17
docs/snippets/csharp/config/parse_links.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Kreuzberg;
|
||||
|
||||
var config = new ExtractionConfig
|
||||
{
|
||||
UseCache = true
|
||||
};
|
||||
|
||||
var result = KreuzbergLib.ExtractFileSync("document.html", config);
|
||||
|
||||
if (result.Metadata?.Format.Text?.Links != null)
|
||||
{
|
||||
foreach (var link in result.Metadata.Format.Text.Links)
|
||||
{
|
||||
var text = link[0];
|
||||
var url = link[1];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user