RafaelEstevam.Simple.Spider
0.9.13
.NET 6.0
This package targets .NET 6.0. The package is compatible with this framework or higher.
.NET Core 3.1
This package targets .NET Core 3.1. The package is compatible with this framework or higher.
.NET Standard 2.1
This package targets .NET Standard 2.1. The package is compatible with this framework or higher.
dotnet add package RafaelEstevam.Simple.Spider --version 0.9.13
NuGet\Install-Package RafaelEstevam.Simple.Spider -Version 0.9.13
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="RafaelEstevam.Simple.Spider" Version="0.9.13" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RafaelEstevam.Simple.Spider --version 0.9.13
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: RafaelEstevam.Simple.Spider, 0.9.13"
#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 RafaelEstevam.Simple.Spider as a Cake Addin #addin nuget:?package=RafaelEstevam.Simple.Spider&version=0.9.13 // Install RafaelEstevam.Simple.Spider as a Cake Tool #tool nuget:?package=RafaelEstevam.Simple.Spider&version=0.9.13
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Simple.Spider
A simple and modular web spider written in C# .Net
- Core 3.1
- Net 5.0
- NET Standard 2.1
This Package was moved from [Net.RafaelEstevam.Spider.Simple.Lib]
Content
Some advantages
- Very simple to use and operate, ideal for lots of small projects or personal ones
- Easy html filter with HObject (a HtmlNode wrap with use similar to JObject)
- Internal conversion from html to XElement, no need to external tools on use
- Automatic Json parser to JObject
- Automatic Json deserialize <T>
- Modular Parser engine (you can add your own parsers!)
- JSON and XML already included
- Modular Caching engine (you can add your own!)
- Stand alone Cache engine included, no need to external softwares
- Modular Downloader engine (you can add your own!)
- WebClient with cookies or HttpClient download engine included
Easy import with NuGet
Getting started
- Start a new console project and add Nuget Reference
- PM> Install-Package Net.RafaelEstevam.Spider.Simple.Lib
- Create a class for your spider (or leave in program)
- create a new instance of SimpleSpider
- Give it a name, cache and log will be saved with that name
- Give it a domain (your spider will not fleet from it)
- Add a event
FetchCompleted
to - Optionally give a first page with
AddPage
. If omitted, it will use the home page of the domain - Call
Execute()
void run()
{
var spider = new SimpleSpider("QuotesToScrape", new Uri("http://quotes.toscrape.com/"));
// Set the completed event to implement your stuff
spider.FetchCompleted += fetchCompleted_items;
// execute
spider.Execute();
}
void fetchCompleted_items(object Sender, FetchCompleteEventArgs args)
{
// walk around ...
// TIP: inspect args to see stuff
var hObj = args.GetHObject();
string[] quotes = hObj["span > .text"];
}
TIP: Use the Simple.Tests project to see examples and poke around
Samples
See all samples at Simple.Tests
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. 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 is compatible. 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. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 is compatible. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETCoreApp 3.1
- HtmlAgilityPack (>= 1.11.59)
- Microsoft.CSharp (>= 4.7.0)
- Newtonsoft.Json (>= 13.0.3)
- Serilog (>= 3.1.1)
- Serilog.Sinks.Console (>= 5.0.1)
- Serilog.Sinks.File (>= 5.0.0)
-
.NETStandard 2.1
- HtmlAgilityPack (>= 1.11.59)
- Microsoft.CSharp (>= 4.7.0)
- Newtonsoft.Json (>= 13.0.3)
- Serilog (>= 3.1.1)
- Serilog.Sinks.Console (>= 5.0.1)
- Serilog.Sinks.File (>= 5.0.0)
-
net6.0
- HtmlAgilityPack (>= 1.11.59)
- Microsoft.CSharp (>= 4.7.0)
- Newtonsoft.Json (>= 13.0.3)
- Serilog (>= 3.1.1)
- Serilog.Sinks.Console (>= 5.0.1)
- Serilog.Sinks.File (>= 5.0.0)
-
net8.0
- HtmlAgilityPack (>= 1.11.59)
- Microsoft.CSharp (>= 4.7.0)
- Newtonsoft.Json (>= 13.0.3)
- Serilog (>= 3.1.1)
- Serilog.Sinks.Console (>= 5.0.1)
- Serilog.Sinks.File (>= 5.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on RafaelEstevam.Simple.Spider:
Package | Downloads |
---|---|
RafaelEstevam.Simple.Spider.SqliteStorage
Sqlite-based storage engine to the SimpleSpider See examples and documentation on the GitHub page |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
0.9.13 | 196 | 3/26/2024 | |
0.9.12 | 286 | 11/5/2023 | |
0.9.11 | 182 | 9/22/2023 | |
0.9.10 | 117 | 9/21/2023 | |
0.9.9 | 251 | 4/23/2023 | |
0.9.8 | 200 | 4/15/2023 | |
0.9.7 | 220 | 4/15/2023 | |
0.9.6 | 198 | 4/15/2023 | |
0.9.5 | 186 | 4/12/2023 | |
0.9.4 | 200 | 4/11/2023 | |
0.9.3 | 436 | 8/7/2022 | |
0.9.2 | 393 | 8/5/2022 | |
0.9.1 | 405 | 7/25/2022 | |
0.9.0 | 447 | 4/1/2022 | |
0.8.7 | 276 | 1/6/2022 | |
0.8.6 | 374 | 10/8/2021 | |
0.8.5 | 420 | 8/1/2021 | |
0.8.4 | 338 | 6/23/2021 | |
0.8.3 | 337 | 6/14/2021 | |
0.8.2 | 324 | 6/12/2021 | |
0.8.1 | 568 | 3/27/2021 | |
0.7.521 | 448 | 2/20/2021 | |
0.7.508 | 318 | 1/31/2021 | |
0.7.501 | 583 | 12/30/2020 | |
0.7.484 | 662 | 12/23/2020 | |
0.7.458 | 604 | 11/30/2020 | |
0.7.425 | 485 | 11/25/2020 | |
0.7.400 | 427 | 11/16/2020 | |
0.7.390 | 496 | 11/15/2020 | |
0.7.378 | 370 | 11/13/2020 |
See examples and documentation on the GitHub page