Class: Crawlberg::CrawlConfig

Inherits:
Object
  • Object
show all
Defined in:
sig/types.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCrawlConfig

Returns a new instance of CrawlConfig.

Parameters:

  • max_depth: (Integer)
  • max_pages: (Integer)
  • max_links_per_page: (Integer)
  • max_concurrent: (Integer)
  • crawl_strategy: (CrawlStrategyKind)
  • content_filter: (ContentFilterKind)
  • bm25_query: (String)
  • bm25_threshold: (Float)
  • respect_robots_txt: (Boolean)
  • soft_http_errors: (Boolean)
  • user_agent: (String)
  • stay_on_domain: (Boolean)
  • allow_subdomains: (Boolean)
  • include_paths: (Array[String])
  • exclude_paths: (Array[String])
  • custom_headers: (Hash[String, String])
  • request_timeout: (Integer)
  • rate_limit_ms: (Integer)
  • max_redirects: (Integer)
  • retry_count: (Integer)
  • retry_codes: (Array[Integer])
  • cookies_enabled: (Boolean)
  • auth: (AuthConfig)
  • max_body_size: (Integer)
  • remove_tags: (Array[String])
  • content: (ContentConfig)
  • map_limit: (Integer)
  • map_search: (String)
  • download_assets: (Boolean)
  • asset_types: (Array[AssetCategory])
  • max_asset_size: (Integer)
  • browser: (BrowserConfig)
  • proxy: (ProxyConfig)
  • user_agents: (Array[String])
  • capture_screenshot: (Boolean)
  • follow_document_urls: (Boolean)
  • document_url_depth: (Integer)
  • download_documents: (Boolean)
  • document_max_size: (Integer)
  • document_mime_types: (Array[String])
  • document_output_dir: (String)
  • document_content_encoding: (DocumentContentEncoding)
  • warc_output: (String)
  • browser_profile: (String)
  • save_browser_profile: (Boolean)
  • ssrf: (SsrfPolicy)
  • ssrf_deny_private_explicit: (Boolean)


188
# File 'sig/types.rbs', line 188

def initialize: (?max_depth: Integer, ?max_pages: Integer, ?max_links_per_page: Integer, ?max_concurrent: Integer, ?crawl_strategy: CrawlStrategyKind, ?content_filter: ContentFilterKind, ?bm25_query: String, ?bm25_threshold: Float, ?respect_robots_txt: bool, ?soft_http_errors: bool, ?user_agent: String, ?stay_on_domain: bool, ?allow_subdomains: bool, ?include_paths: Array[String], ?exclude_paths: Array[String], ?custom_headers: Hash[String, String], ?request_timeout: Integer, ?rate_limit_ms: Integer, ?max_redirects: Integer, ?retry_count: Integer, ?retry_codes: Array[Integer], ?cookies_enabled: bool, ?auth: AuthConfig, ?max_body_size: Integer, ?remove_tags: Array[String], ?content: ContentConfig, ?map_limit: Integer, ?map_search: String, ?download_assets: bool, ?asset_types: Array[AssetCategory], ?max_asset_size: Integer, ?browser: BrowserConfig, ?proxy: ProxyConfig, ?user_agents: Array[String], ?capture_screenshot: bool, ?follow_document_urls: bool, ?document_url_depth: Integer, ?download_documents: bool, ?document_max_size: Integer, ?document_mime_types: Array[String], ?document_output_dir: String, ?document_content_encoding: DocumentContentEncoding, ?warc_output: String, ?browser_profile: String, ?save_browser_profile: bool, ?ssrf: SsrfPolicy, ?ssrf_deny_private_explicit: bool) -> void

Instance Attribute Details

#allow_subdomainsBoolean (readonly)

Returns the value of attribute allow_subdomains.

Returns:

  • (Boolean)


152
153
154
# File 'sig/types.rbs', line 152

def allow_subdomains
  @allow_subdomains
end

#asset_typesArray[AssetCategory] (readonly)

Returns the value of attribute asset_types.

Returns:



169
170
171
# File 'sig/types.rbs', line 169

def asset_types
  @asset_types
end

#authAuthConfig? (readonly)

Returns the value of attribute auth.

Returns:



162
163
164
# File 'sig/types.rbs', line 162

def auth
  @auth
end

#bm25_queryString? (readonly)

Returns the value of attribute bm25_query.

Returns:

  • (String, nil)


146
147
148
# File 'sig/types.rbs', line 146

def bm25_query
  @bm25_query
end

#bm25_thresholdFloat? (readonly)

Returns the value of attribute bm25_threshold.

Returns:

  • (Float, nil)


147
148
149
# File 'sig/types.rbs', line 147

def bm25_threshold
  @bm25_threshold
end

#browserBrowserConfig (readonly)

Returns the value of attribute browser.

Returns:



171
172
173
# File 'sig/types.rbs', line 171

def browser
  @browser
end

#browser_profileString? (readonly)

Returns the value of attribute browser_profile.

Returns:

  • (String, nil)


183
184
185
# File 'sig/types.rbs', line 183

def browser_profile
  @browser_profile
end

#capture_screenshotBoolean (readonly)

Returns the value of attribute capture_screenshot.

Returns:

  • (Boolean)


174
175
176
# File 'sig/types.rbs', line 174

def capture_screenshot
  @capture_screenshot
end

#contentContentConfig (readonly)

Returns the value of attribute content.

Returns:



165
166
167
# File 'sig/types.rbs', line 165

def content
  @content
end

#content_filterContentFilterKind? (readonly)

Returns the value of attribute content_filter.

Returns:



145
146
147
# File 'sig/types.rbs', line 145

def content_filter
  @content_filter
end

#cookies_enabledBoolean (readonly)

Returns the value of attribute cookies_enabled.

Returns:

  • (Boolean)


161
162
163
# File 'sig/types.rbs', line 161

def cookies_enabled
  @cookies_enabled
end

#crawl_strategyCrawlStrategyKind (readonly)

Returns the value of attribute crawl_strategy.

Returns:



144
145
146
# File 'sig/types.rbs', line 144

def crawl_strategy
  @crawl_strategy
end

#custom_headersHash[String, String] (readonly)

Returns the value of attribute custom_headers.

Returns:

  • (Hash[String, String])


155
156
157
# File 'sig/types.rbs', line 155

def custom_headers
  @custom_headers
end

#document_content_encodingDocumentContentEncoding? (readonly)

Returns the value of attribute document_content_encoding.

Returns:



181
182
183
# File 'sig/types.rbs', line 181

def document_content_encoding
  @document_content_encoding
end

#document_max_sizeInteger? (readonly)

Returns the value of attribute document_max_size.

Returns:

  • (Integer, nil)


178
179
180
# File 'sig/types.rbs', line 178

def document_max_size
  @document_max_size
end

#document_mime_typesArray[String] (readonly)

Returns the value of attribute document_mime_types.

Returns:

  • (Array[String])


179
180
181
# File 'sig/types.rbs', line 179

def document_mime_types
  @document_mime_types
end

#document_output_dirString? (readonly)

Returns the value of attribute document_output_dir.

Returns:

  • (String, nil)


180
181
182
# File 'sig/types.rbs', line 180

def document_output_dir
  @document_output_dir
end

#document_url_depthInteger? (readonly)

Returns the value of attribute document_url_depth.

Returns:

  • (Integer, nil)


176
177
178
# File 'sig/types.rbs', line 176

def document_url_depth
  @document_url_depth
end

#download_assetsBoolean (readonly)

Returns the value of attribute download_assets.

Returns:

  • (Boolean)


168
169
170
# File 'sig/types.rbs', line 168

def download_assets
  @download_assets
end

#download_documentsBoolean (readonly)

Returns the value of attribute download_documents.

Returns:

  • (Boolean)


177
178
179
# File 'sig/types.rbs', line 177

def download_documents
  @download_documents
end

#exclude_pathsArray[String] (readonly)

Returns the value of attribute exclude_paths.

Returns:

  • (Array[String])


154
155
156
# File 'sig/types.rbs', line 154

def exclude_paths
  @exclude_paths
end

#follow_document_urlsBoolean (readonly)

Returns the value of attribute follow_document_urls.

Returns:

  • (Boolean)


175
176
177
# File 'sig/types.rbs', line 175

def follow_document_urls
  @follow_document_urls
end

#include_pathsArray[String] (readonly)

Returns the value of attribute include_paths.

Returns:

  • (Array[String])


153
154
155
# File 'sig/types.rbs', line 153

def include_paths
  @include_paths
end

#map_limitInteger? (readonly)

Returns the value of attribute map_limit.

Returns:

  • (Integer, nil)


166
167
168
# File 'sig/types.rbs', line 166

def map_limit
  @map_limit
end

#map_searchString? (readonly)

Returns the value of attribute map_search.

Returns:

  • (String, nil)


167
168
169
# File 'sig/types.rbs', line 167

def map_search
  @map_search
end

#max_asset_sizeInteger? (readonly)

Returns the value of attribute max_asset_size.

Returns:

  • (Integer, nil)


170
171
172
# File 'sig/types.rbs', line 170

def max_asset_size
  @max_asset_size
end

#max_body_sizeInteger? (readonly)

Returns the value of attribute max_body_size.

Returns:

  • (Integer, nil)


163
164
165
# File 'sig/types.rbs', line 163

def max_body_size
  @max_body_size
end

#max_concurrentInteger? (readonly)

Returns the value of attribute max_concurrent.

Returns:

  • (Integer, nil)


143
144
145
# File 'sig/types.rbs', line 143

def max_concurrent
  @max_concurrent
end

#max_depthInteger? (readonly)

Returns the value of attribute max_depth.

Returns:

  • (Integer, nil)


140
141
142
# File 'sig/types.rbs', line 140

def max_depth
  @max_depth
end

Returns the value of attribute max_links_per_page.

Returns:

  • (Integer, nil)


142
143
144
# File 'sig/types.rbs', line 142

def max_links_per_page
  @max_links_per_page
end

#max_pagesInteger? (readonly)

Returns the value of attribute max_pages.

Returns:

  • (Integer, nil)


141
142
143
# File 'sig/types.rbs', line 141

def max_pages
  @max_pages
end

#max_redirectsInteger (readonly)

Returns the value of attribute max_redirects.

Returns:

  • (Integer)


158
159
160
# File 'sig/types.rbs', line 158

def max_redirects
  @max_redirects
end

#proxyProxyConfig? (readonly)

Returns the value of attribute proxy.

Returns:



172
173
174
# File 'sig/types.rbs', line 172

def proxy
  @proxy
end

#rate_limit_msInteger? (readonly)

Returns the value of attribute rate_limit_ms.

Returns:

  • (Integer, nil)


157
158
159
# File 'sig/types.rbs', line 157

def rate_limit_ms
  @rate_limit_ms
end

#remove_tagsArray[String] (readonly)

Returns the value of attribute remove_tags.

Returns:

  • (Array[String])


164
165
166
# File 'sig/types.rbs', line 164

def remove_tags
  @remove_tags
end

#request_timeoutInteger (readonly)

Returns the value of attribute request_timeout.

Returns:

  • (Integer)


156
157
158
# File 'sig/types.rbs', line 156

def request_timeout
  @request_timeout
end

#respect_robots_txtBoolean (readonly)

Returns the value of attribute respect_robots_txt.

Returns:

  • (Boolean)


148
149
150
# File 'sig/types.rbs', line 148

def respect_robots_txt
  @respect_robots_txt
end

#retry_codesArray[Integer] (readonly)

Returns the value of attribute retry_codes.

Returns:

  • (Array[Integer])


160
161
162
# File 'sig/types.rbs', line 160

def retry_codes
  @retry_codes
end

#retry_countInteger (readonly)

Returns the value of attribute retry_count.

Returns:

  • (Integer)


159
160
161
# File 'sig/types.rbs', line 159

def retry_count
  @retry_count
end

#save_browser_profileBoolean (readonly)

Returns the value of attribute save_browser_profile.

Returns:

  • (Boolean)


184
185
186
# File 'sig/types.rbs', line 184

def save_browser_profile
  @save_browser_profile
end

#soft_http_errorsBoolean (readonly)

Returns the value of attribute soft_http_errors.

Returns:

  • (Boolean)


149
150
151
# File 'sig/types.rbs', line 149

def soft_http_errors
  @soft_http_errors
end

#ssrfSsrfPolicy (readonly)

Returns the value of attribute ssrf.

Returns:



185
186
187
# File 'sig/types.rbs', line 185

def ssrf
  @ssrf
end

#ssrf_deny_private_explicitBoolean? (readonly)

Returns the value of attribute ssrf_deny_private_explicit.

Returns:

  • (Boolean, nil)


186
187
188
# File 'sig/types.rbs', line 186

def ssrf_deny_private_explicit
  @ssrf_deny_private_explicit
end

#stay_on_domainBoolean (readonly)

Returns the value of attribute stay_on_domain.

Returns:

  • (Boolean)


151
152
153
# File 'sig/types.rbs', line 151

def stay_on_domain
  @stay_on_domain
end

#user_agentString? (readonly)

Returns the value of attribute user_agent.

Returns:

  • (String, nil)


150
151
152
# File 'sig/types.rbs', line 150

def user_agent
  @user_agent
end

#user_agentsArray[String] (readonly)

Returns the value of attribute user_agents.

Returns:

  • (Array[String])


173
174
175
# File 'sig/types.rbs', line 173

def user_agents
  @user_agents
end

#warc_outputString? (readonly)

Returns the value of attribute warc_output.

Returns:

  • (String, nil)


182
183
184
# File 'sig/types.rbs', line 182

def warc_output
  @warc_output
end

Instance Method Details

#validatevoid

This method returns an undefined value.



189
# File 'sig/types.rbs', line 189

def validate: () -> void