TagsProvider is a tool for extracting HTML tags from a string, in event-driven way. Helps to extract text, structured data, from a specific site.
Go to file
Alexander Kozachenko 5598d0f898 refactoring #6 (#7)
refactoring #6

Co-authored-by: Alexander Kozachenko <119358312+Alex-Kozachenko@users.noreply.github.com>
Reviewed-on: #7
2023-12-08 01:46:37 +00:00
pack refactoring #6 (#7) 2023-12-08 01:46:37 +00:00
src refactoring #6 (#7) 2023-12-08 01:46:37 +00:00
tests refactoring #6 (#7) 2023-12-08 01:46:37 +00:00
Changelog.md moved to src 2023-11-06 19:32:19 +03:00
License moved to src 2023-11-06 19:32:19 +03:00
Readme.md Updated Readme for 2.0.0-rc1.3 2023-12-02 20:02:38 +03:00
src.code-workspace Release v1.0.2 2023-11-07 16:51:25 +03:00
src.sln Release v1.0.2 2023-11-07 16:51:25 +03:00

ProSol.Html.TagsProvider

TagsProvider is a tool for extracting HTML tags from a string, in event-driven way. Helps to extract text, structured data, from a specific site.

How to use?

Install the package:

dotnet add package ProSol.Html.TagsProvider --version 2.0.0-rc1.3

Fetch some html:
```csharp
var url = "https://en.wikipedia.org/wiki/Food_energy";
var html = HtmlSource.GetHtmlAsync(url).Result;

Process all a tag:

var provider = new TagsProvider();
provider.Subscribe(new ConsoleLogObserver(html), "a");
provider.Process(html);

That's it! The provider notifies about any tag met and its data:

  • name,
  • range of entire tag,
  • range of inner content.

More demos here.