ArnabDeveloper.HtmlContent.Core
1.0.6
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package ArnabDeveloper.HtmlContent.Core --version 1.0.6
NuGet\Install-Package ArnabDeveloper.HtmlContent.Core -Version 1.0.6
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ArnabDeveloper.HtmlContent.Core" Version="1.0.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ArnabDeveloper.HtmlContent.Core --version 1.0.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ArnabDeveloper.HtmlContent.Core, 1.0.6"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ArnabDeveloper.HtmlContent.Core as a Cake Addin #addin nuget:?package=ArnabDeveloper.HtmlContent.Core&version=1.0.6 // Install ArnabDeveloper.HtmlContent.Core as a Cake Tool #tool nuget:?package=ArnabDeveloper.HtmlContent.Core&version=1.0.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
HTML content
It takes a collection of HTTP URLs and returns HTML responses of them. Internally
it used System.Net.WebClient
to get the HTML response of the URLs.
There are five methods to get the HTML responses.
GetContent()
get html contents synchronouslyGetContentAsync()
get html contents asynchronouslyGetContentAsyncStream()
get html contents asynchronously but start to return contents as they are ready before all are completeGetContentParallelAsync()
get html contents asynchronously in parallelGetContentParallelForEachAsync()
get html contents asynchronously in parallel usingParallel.ForEach()
GetContentParallelForEachProgressAsync()
get html contents asynchronously in parallel usingParallel.ForEach()
and start to return contents as they are ready before all are complete with progress data.
Example code to use the library:
IHtmlContentService _htmlContentService = new HtmlContentService();
_htmlContentService.Urls.Add("http://google.com");
_htmlContentService.Urls.Add("http://microsoft.com");
IEnumerable<WebSiteDataModel> webSiteDataModels = _htmlContentService.GetContent();
foreach (WebSiteDataModel webSiteDataModel in webSiteDataModels)
{
Console.WriteLine(webSiteDataModel.WebsiteUrl);
Console.WriteLine(webSiteDataModel.WebsiteData);
}
This is influenced by C# Advanced Async by TimCorey
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on ArnabDeveloper.HtmlContent.Core:
Package | Downloads |
---|---|
Arc.HtmlContent.DI
Html Content Core DI for ASP.NET |
GitHub repositories
This package is not used by any popular GitHub repositories.
dotnet 6 upgrade