22 lines
563 B
C#
22 lines
563 B
C#
namespace ScrapperAPI.Options;
|
|
|
|
public class ScraperOptions
|
|
{
|
|
public int DelayMinMs { get; init; } = 100;
|
|
public int DelayMaxMs { get; init; } = 3000;
|
|
|
|
public RateLimitOptions RateLimit { get; init; } = new();
|
|
public RetryOptions Retry { get; init; } = new();
|
|
}
|
|
|
|
public sealed class RateLimitOptions
|
|
{
|
|
public int PerDomainMinDelayMs { get; init; } = 500;
|
|
}
|
|
|
|
public sealed class RetryOptions
|
|
{
|
|
public int MaxAttempts { get; init; } = 5;
|
|
public int BaseDelayMs { get; init; } = 250;
|
|
public int MaxDelayMs { get; init; } = 8000;
|
|
} |