CommonCrawl.Net
1.0.9
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 CommonCrawl.Net --version 1.0.9
NuGet\Install-Package CommonCrawl.Net -Version 1.0.9
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="CommonCrawl.Net" Version="1.0.9" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CommonCrawl.Net" Version="1.0.9" />
<PackageReference Include="CommonCrawl.Net" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CommonCrawl.Net --version 1.0.9
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CommonCrawl.Net, 1.0.9"
#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.
#:package CommonCrawl.Net@1.0.9
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CommonCrawl.Net&version=1.0.9
#tool nuget:?package=CommonCrawl.Net&version=1.0.9
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CommonCrawl.Net
🇬🇧 English
Overview
CommonCrawl.Net is a robust .NET library designed to interact with the Common Crawl dataset. It simplifies the process of fetching dataset metadata, downloading files with built-in resume support, and parsing GZIP-compressed WARC files efficiently.
Features
- DataSetHandler: Automatically fetch and cache the list of available Common Crawl dataset versions (collections) from
index.commoncrawl.org. - DownloadHandler: Reliable file downloading utility that supports resuming interrupted downloads (HTTP Range requests).
- GzWarcReader: A high-performance reader for parsing WARC (Web ARChive) files directly from a URL or a local stream. It handles GZIP decompression transparently.
Usage Examples
1. Get Dataset Information & URLs
using CommonCrawl.Handlers;
using CommonCrawl.Utils;
// Get the latest dataset version
var latestInfo = await DataSetHandler.Instance.GetLatestAsync();
Console.WriteLine($"Latest Crawl: {latestInfo.Id}");
// Get download URLs for paths (WARC, WAT, WET, etc.)
var pathUrls = CommonCrawlUrlSplicer.FromCollectionInfo(latestInfo.Id);
Console.WriteLine($"WARC Paths URL: {pathUrls.WARC}");
2. Download a File
using CommonCrawl.Handlers;
string url = "https://data.commoncrawl.org/crawl-data/CC-MAIN-2023-50/warc.paths.gz";
string destination = "warc.paths.gz";
// Downloads with resume capability
await DownloadHandler.Instance.DownloadAsync(url, destination);
3. Read WARC Records
using CommonCrawl.Readers;
string warcUrl = "https://data.commoncrawl.org/.../file.warc.gz";
// Stream and parse WARC records directly from the URL
await foreach (var block in GzWarcReader.Instance.ReadAsAsyncEnumerable(warcUrl))
{
Console.WriteLine($"Record Type: {block.Type}");
if (block is WarcResponseRecord response)
{
Console.WriteLine($"Target URI: {response.TargetUri}");
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.