Show / Hide Table of Contents

Class ScraperBuilder

A class for configuring scraper-related services

Inheritance
System.Object
ScraperBuilder
Namespace: Scraper.Net
Assembly: Scraper.Net.dll
Syntax
public class ScraperBuilder : object

Constructors

| Improve this Doc View Source

ScraperBuilder(IServiceCollection)

Declaration
public ScraperBuilder(IServiceCollection services)
Parameters
Type Name Description
IServiceCollection services

Properties

| Improve this Doc View Source

Services

Declaration
public IServiceCollection Services { get; }
Property Value
Type Description
IServiceCollection

Methods

| Improve this Doc View Source

AddPostFilter(PostFilter)

Adds a singleton service of the type PostFilter to the specified IServiceCollection

Declaration
public ScraperBuilder AddPostFilter(PostFilter filter)
Parameters
Type Name Description
PostFilter filter

The filter

Returns
Type Description
ScraperBuilder

A reference to this instance after the operation has completed

| Improve this Doc View Source

AddPostProcessor(Func<IServiceProvider, IPostProcessor>)

Adds a singleton service of the type IPostProcessor using a factory specified in factory to the specified IServiceCollection

Declaration
public ScraperBuilder AddPostProcessor(Func<IServiceProvider, IPostProcessor> factory)
Parameters
Type Name Description
Func<IServiceProvider, IPostProcessor> factory

The factory that creates the service

Returns
Type Description
ScraperBuilder

A reference to this instance after the operation has completed

| Improve this Doc View Source

AddScraper(Func<IServiceProvider, (IPlatformScraper, String)>)

Adds a singleton service of the type IPlatformScraper and string platform using a factory specified in factory to the specified IServiceCollection

Declaration
public ScraperBuilder AddScraper(Func<IServiceProvider, (IPlatformScraper, string)> factory)
Parameters
Type Name Description
Func<IServiceProvider, System.ValueTuple<IPlatformScraper, System.String>> factory

The factory that creates the service

Returns
Type Description
ScraperBuilder

A reference to this instance after the operation has completed

Extension Methods

ScraperBuilderExtensions.AddScreenshot(ScraperBuilder, Action<ScreenshotterBuilder>, HtmlCssToImageCredentials, Boolean)
ScraperExtensions.AddYoutube(ScraperBuilder, YoutubeConfig, String)
ScraperExtensions.AddFeeds(ScraperBuilder, String)
ScraperExtensions.AddTwitter(ScraperBuilder, TwitterConfig, String)
ScraperExtensions.AddFacebook(ScraperBuilder, FacebookConfig, String)
ScraperBuilderExtensions.AddYoutubeDl(ScraperBuilder, YoutubeDlConfig)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX