crawlberg 1.3.3 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/sig/types.rbs CHANGED
@@ -1,5 +1,5 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:78599b35c3e08365abebb762ea75ffe2c15e049fd992db89a8a26acf137f8c4f
2
+ # alef:hash:71edb0ad11af2e26ac8c388c9aac9e12715a6a126f85a44c69e785b59fe8ad1f
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify
5
5
 
@@ -9,39 +9,64 @@ module Crawlberg
9
9
 
10
10
  type json_value = Hash[String, untyped] | Array[untyped] | String | Integer | Float | bool | nil
11
11
 
12
- class ExtractionMeta
13
- attr_reader cost: Float?
14
- attr_reader prompt_tokens: Integer?
15
- attr_reader completion_tokens: Integer?
16
- attr_reader model: String?
17
- attr_reader chunks_processed: Integer
12
+ class ActionResult
13
+ attr_reader action_index: Integer
14
+ attr_reader action_type: String
15
+ attr_reader success: bool
16
+ attr_reader data: String?
17
+ attr_reader error: String?
18
18
 
19
- def initialize: (?cost: Float, ?prompt_tokens: Integer, ?completion_tokens: Integer, ?model: String, ?chunks_processed: Integer) -> void
19
+ def initialize: (?action_index: Integer, ?action_type: String, ?success: bool, ?data: String, ?error: String) -> void
20
20
  end
21
21
 
22
- class ProxyConfig
22
+ class ArticleMetadata
23
+ attr_reader published_time: String?
24
+ attr_reader modified_time: String?
25
+ attr_reader author: String?
26
+ attr_reader section: String?
27
+ attr_reader tags: Array[String]
28
+
29
+ def initialize: (?published_time: String, ?modified_time: String, ?author: String, ?section: String, ?tags: Array[String]) -> void
30
+ end
31
+
32
+ class BatchCrawlResult
23
33
  attr_reader url: String
24
- attr_reader username: String?
25
- attr_reader password: String?
34
+ attr_reader result: CrawlResult?
35
+ attr_reader error: String?
26
36
 
27
- def initialize: (?url: String, ?username: String, ?password: String) -> void
37
+ def initialize: (?url: String, ?result: CrawlResult, ?error: String) -> void
28
38
  end
29
39
 
30
- class ContentConfig
31
- attr_reader output_format: String
32
- attr_reader preprocessing_preset: String
33
- attr_reader remove_navigation: bool
34
- attr_reader remove_forms: bool
35
- attr_reader strip_tags: Array[String]
36
- attr_reader preserve_tags: Array[String]
37
- attr_reader exclude_selectors: Array[String]
38
- attr_reader skip_images: bool
39
- attr_reader max_depth: Integer?
40
- attr_reader wrap: bool
41
- attr_reader wrap_width: Integer
42
- attr_reader include_document_structure: bool
40
+ class BatchCrawlResults
41
+ attr_reader results: Array[BatchCrawlResult]
42
+ attr_reader total_count: Integer
43
+ attr_reader completed_count: Integer
44
+ attr_reader failed_count: Integer
43
45
 
44
- def initialize: (?output_format: String, ?preprocessing_preset: String, ?remove_navigation: bool, ?remove_forms: bool, ?strip_tags: Array[String], ?preserve_tags: Array[String], ?exclude_selectors: Array[String], ?skip_images: bool, ?max_depth: Integer, ?wrap: bool, ?wrap_width: Integer, ?include_document_structure: bool) -> void
46
+ def initialize: (?results: Array[BatchCrawlResult], ?total_count: Integer, ?completed_count: Integer, ?failed_count: Integer) -> void
47
+ end
48
+
49
+ class BatchCrawlStreamRequest
50
+ attr_reader urls: Array[String]
51
+
52
+ def initialize: (?urls: Array[String]) -> void
53
+ end
54
+
55
+ class BatchScrapeResult
56
+ attr_reader url: String
57
+ attr_reader result: ScrapeResult?
58
+ attr_reader error: String?
59
+
60
+ def initialize: (?url: String, ?result: ScrapeResult, ?error: String) -> void
61
+ end
62
+
63
+ class BatchScrapeResults
64
+ attr_reader results: Array[BatchScrapeResult]
65
+ attr_reader total_count: Integer
66
+ attr_reader completed_count: Integer
67
+ attr_reader failed_count: Integer
68
+
69
+ def initialize: (?results: Array[BatchScrapeResult], ?total_count: Integer, ?completed_count: Integer, ?failed_count: Integer) -> void
45
70
  end
46
71
 
47
72
  class BrowserConfig
@@ -62,6 +87,55 @@ module Crawlberg
62
87
  def initialize: (?mode: BrowserMode, ?backend: BrowserBackend, ?endpoint: String, ?timeout: Integer, ?wait: BrowserWait, ?wait_selector: String, ?extra_wait: Integer, ?proxy: ProxyConfig, ?block_url_patterns: Array[String], ?eval_script: String, ?robots_user_agent: String, ?capture_network_events: bool, ?session_affinity: bool) -> void
63
88
  end
64
89
 
90
+ class BrowserExtras
91
+ attr_reader eval_result: String?
92
+ attr_reader network_events: Array[ResponseMeta]
93
+ attr_reader cookies: Array[CookieInfo]
94
+
95
+ def initialize: (?eval_result: String, ?network_events: Array[ResponseMeta], ?cookies: Array[CookieInfo]) -> void
96
+ end
97
+
98
+ class CitationReference
99
+ attr_reader index: Integer
100
+ attr_reader url: String
101
+ attr_reader text: String
102
+
103
+ def initialize: (?index: Integer, ?url: String, ?text: String) -> void
104
+ end
105
+
106
+ class CitationResult
107
+ attr_reader content: String
108
+ attr_reader references: Array[CitationReference]
109
+
110
+ def initialize: (?content: String, ?references: Array[CitationReference]) -> void
111
+ end
112
+
113
+ class ContentConfig
114
+ attr_reader output_format: String
115
+ attr_reader preprocessing_preset: String
116
+ attr_reader remove_navigation: bool
117
+ attr_reader remove_forms: bool
118
+ attr_reader strip_tags: Array[String]
119
+ attr_reader preserve_tags: Array[String]
120
+ attr_reader exclude_selectors: Array[String]
121
+ attr_reader skip_images: bool
122
+ attr_reader max_depth: Integer?
123
+ attr_reader wrap: bool
124
+ attr_reader wrap_width: Integer
125
+ attr_reader include_document_structure: bool
126
+
127
+ def initialize: (?output_format: String, ?preprocessing_preset: String, ?remove_navigation: bool, ?remove_forms: bool, ?strip_tags: Array[String], ?preserve_tags: Array[String], ?exclude_selectors: Array[String], ?skip_images: bool, ?max_depth: Integer, ?wrap: bool, ?wrap_width: Integer, ?include_document_structure: bool) -> void
128
+ end
129
+
130
+ class CookieInfo
131
+ attr_reader name: String
132
+ attr_reader value: String
133
+ attr_reader domain: String?
134
+ attr_reader path: String?
135
+
136
+ def initialize: (?name: String, ?value: String, ?domain: String, ?path: String) -> void
137
+ end
138
+
65
139
  class CrawlConfig
66
140
  attr_reader max_depth: Integer?
67
141
  attr_reader max_pages: Integer?
@@ -115,79 +189,9 @@ module Crawlberg
115
189
  def validate: () -> void
116
190
  end
117
191
 
118
- class BrowserExtras
119
- attr_reader eval_result: String?
120
- attr_reader network_events: Array[ResponseMeta]
121
- attr_reader cookies: Array[CookieInfo]
122
-
123
- def initialize: (?eval_result: String, ?network_events: Array[ResponseMeta], ?cookies: Array[CookieInfo]) -> void
124
- end
125
-
126
- class DownloadedDocument
127
- attr_reader url: String
128
- attr_reader mime_type: String
129
- attr_reader size: Integer
130
- attr_reader filename: String?
131
- attr_reader content_hash: String
132
- attr_reader headers: Hash[String, String]
133
- attr_reader truncated: bool
134
- attr_reader content_path: String?
135
- attr_reader content_base64: String?
136
-
137
- def initialize: (?url: String, ?mime_type: String, ?size: Integer, ?filename: String, ?content_hash: String, ?headers: Hash[String, String], ?truncated: bool, ?content_path: String, ?content_base64: String) -> void
138
- end
139
-
140
- class InteractionResult
141
- attr_reader action_results: Array[ActionResult]
142
- attr_reader final_html: String
143
- attr_reader final_url: String
144
- attr_reader screenshot_base64: String?
145
-
146
- def initialize: (?action_results: Array[ActionResult], ?final_html: String, ?final_url: String, ?screenshot_base64: String) -> void
147
- end
148
-
149
- class ActionResult
150
- attr_reader action_index: Integer
151
- attr_reader action_type: String
152
- attr_reader success: bool
153
- attr_reader data: String?
154
- attr_reader error: String?
155
-
156
- def initialize: (?action_index: Integer, ?action_type: String, ?success: bool, ?data: String, ?error: String) -> void
157
- end
158
-
159
- class ScrapeResult
160
- attr_reader status_code: Integer
161
- attr_reader final_url: String
162
- attr_reader content_type: String
163
- attr_reader html: String
164
- attr_reader body_size: Integer
165
- attr_reader metadata: PageMetadata
166
- attr_reader links: Array[LinkInfo]
167
- attr_reader images: Array[ImageInfo]
168
- attr_reader feeds: Array[FeedInfo]
169
- attr_reader json_ld: Array[JsonLdEntry]
170
- attr_reader is_allowed: bool
171
- attr_reader crawl_delay: Integer?
172
- attr_reader noindex_detected: bool
173
- attr_reader nofollow_detected: bool
174
- attr_reader x_robots_tag: String?
175
- attr_reader is_pdf: bool
176
- attr_reader was_skipped: bool
177
- attr_reader detected_charset: String?
178
- attr_reader auth_header_sent: bool
179
- attr_reader response_meta: ResponseMeta?
180
- attr_reader assets: Array[DownloadedAsset]
181
- attr_reader js_render_hint: bool
182
- attr_reader browser_used: bool
183
- attr_reader markdown: MarkdownResult?
184
- attr_reader extracted_data: String?
185
- attr_reader extraction_meta: ExtractionMeta?
186
- attr_reader screenshot_base64: String?
187
- attr_reader downloaded_document: DownloadedDocument?
188
- attr_reader browser: BrowserExtras?
189
-
190
- def initialize: (?status_code: Integer, ?final_url: String, ?content_type: String, ?html: String, ?body_size: Integer, ?metadata: PageMetadata, ?links: Array[LinkInfo], ?images: Array[ImageInfo], ?feeds: Array[FeedInfo], ?json_ld: Array[JsonLdEntry], ?is_allowed: bool, ?crawl_delay: Integer, ?noindex_detected: bool, ?nofollow_detected: bool, ?x_robots_tag: String, ?is_pdf: bool, ?was_skipped: bool, ?detected_charset: String, ?auth_header_sent: bool, ?response_meta: ResponseMeta, ?assets: Array[DownloadedAsset], ?js_render_hint: bool, ?browser_used: bool, ?markdown: MarkdownResult, ?extracted_data: String, ?extraction_meta: ExtractionMeta, ?screenshot_base64: String, ?downloaded_document: DownloadedDocument, ?browser: BrowserExtras) -> void
192
+ class CrawlEngineHandle
193
+ def crawl_stream: (CrawlStreamRequest req) -> Enumerator[CrawlEvent]
194
+ def batch_crawl_stream: (BatchCrawlStreamRequest req) -> Enumerator[CrawlEvent]
191
195
  end
192
196
 
193
197
  class CrawlPageResult
@@ -230,50 +234,54 @@ module Crawlberg
230
234
  def unique_normalized_urls: () -> Integer
231
235
  end
232
236
 
233
- class SitemapUrl
237
+ class CrawlStreamRequest
234
238
  attr_reader url: String
235
- attr_reader lastmod: String?
236
- attr_reader changefreq: String?
237
- attr_reader priority: String?
238
239
 
239
- def initialize: (?url: String, ?lastmod: String, ?changefreq: String, ?priority: String) -> void
240
+ def initialize: (?url: String) -> void
240
241
  end
241
242
 
242
- class MapResult
243
- attr_reader urls: Array[SitemapUrl]
243
+ class DownloadedAsset
244
+ attr_reader url: String
245
+ attr_reader content_hash: String
246
+ attr_reader mime_type: String?
247
+ attr_reader size: Integer
248
+ attr_reader asset_category: AssetCategory
249
+ attr_reader html_tag: String?
244
250
 
245
- def initialize: (?urls: Array[SitemapUrl]) -> void
251
+ def initialize: (?url: String, ?content_hash: String, ?mime_type: String, ?size: Integer, ?asset_category: AssetCategory, ?html_tag: String) -> void
246
252
  end
247
253
 
248
- class MarkdownResult
249
- attr_reader content: String
250
- attr_reader document_structure: String?
251
- attr_reader tables: Array[String]
252
- attr_reader warnings: Array[String]
253
- attr_reader citations: bool
254
- attr_reader fit_content: String?
254
+ class DownloadedDocument
255
+ attr_reader url: String
256
+ attr_reader mime_type: String
257
+ attr_reader size: Integer
258
+ attr_reader filename: String?
259
+ attr_reader content_hash: String
260
+ attr_reader headers: Hash[String, String]
261
+ attr_reader truncated: bool
262
+ attr_reader content_path: String?
263
+ attr_reader content_base64: String?
255
264
 
256
- def initialize: (?content: String, ?document_structure: String, ?tables: Array[String], ?warnings: Array[String], ?citations: bool, ?fit_content: String) -> void
265
+ def initialize: (?url: String, ?mime_type: String, ?size: Integer, ?filename: String, ?content_hash: String, ?headers: Hash[String, String], ?truncated: bool, ?content_path: String, ?content_base64: String) -> void
257
266
  end
258
267
 
259
- class LinkInfo
260
- attr_reader url: String
261
- attr_reader text: String
262
- attr_reader link_type: LinkType
263
- attr_reader rel: String?
264
- attr_reader nofollow: bool
268
+ class ExtractionMeta
269
+ attr_reader cost: Float?
270
+ attr_reader prompt_tokens: Integer?
271
+ attr_reader completion_tokens: Integer?
272
+ attr_reader model: String?
273
+ attr_reader chunks_processed: Integer
265
274
 
266
- def initialize: (?url: String, ?text: String, ?link_type: LinkType, ?rel: String, ?nofollow: bool) -> void
275
+ def initialize: (?cost: Float, ?prompt_tokens: Integer, ?completion_tokens: Integer, ?model: String, ?chunks_processed: Integer) -> void
267
276
  end
268
277
 
269
- class ImageInfo
278
+ class FaviconInfo
270
279
  attr_reader url: String
271
- attr_reader alt: String?
272
- attr_reader width: Integer?
273
- attr_reader height: Integer?
274
- attr_reader source: ImageSource
280
+ attr_reader rel: String
281
+ attr_reader sizes: String?
282
+ attr_reader mime_type: String?
275
283
 
276
- def initialize: (?url: String, ?alt: String, ?width: Integer, ?height: Integer, ?source: ImageSource) -> void
284
+ def initialize: (?url: String, ?rel: String, ?sizes: String, ?mime_type: String) -> void
277
285
  end
278
286
 
279
287
  class FeedInfo
@@ -284,77 +292,72 @@ module Crawlberg
284
292
  def initialize: (?url: String, ?title: String, ?feed_type: FeedType) -> void
285
293
  end
286
294
 
287
- class JsonLdEntry
288
- attr_reader schema_type: String
289
- attr_reader name: String?
290
- attr_reader raw: String
295
+ class HeadingInfo
296
+ attr_reader level: Integer
297
+ attr_reader text: String
291
298
 
292
- def initialize: (?schema_type: String, ?name: String, ?raw: String) -> void
299
+ def initialize: (?level: Integer, ?text: String) -> void
293
300
  end
294
301
 
295
- class CookieInfo
296
- attr_reader name: String
297
- attr_reader value: String
298
- attr_reader domain: String?
299
- attr_reader path: String?
302
+ class HreflangEntry
303
+ attr_reader lang: String
304
+ attr_reader url: String
300
305
 
301
- def initialize: (?name: String, ?value: String, ?domain: String, ?path: String) -> void
306
+ def initialize: (?lang: String, ?url: String) -> void
302
307
  end
303
308
 
304
- class DownloadedAsset
309
+ class ImageInfo
305
310
  attr_reader url: String
306
- attr_reader content_hash: String
307
- attr_reader mime_type: String?
308
- attr_reader size: Integer
309
- attr_reader asset_category: AssetCategory
310
- attr_reader html_tag: String?
311
+ attr_reader alt: String?
312
+ attr_reader width: Integer?
313
+ attr_reader height: Integer?
314
+ attr_reader source: ImageSource
311
315
 
312
- def initialize: (?url: String, ?content_hash: String, ?mime_type: String, ?size: Integer, ?asset_category: AssetCategory, ?html_tag: String) -> void
316
+ def initialize: (?url: String, ?alt: String, ?width: Integer, ?height: Integer, ?source: ImageSource) -> void
313
317
  end
314
318
 
315
- class ArticleMetadata
316
- attr_reader published_time: String?
317
- attr_reader modified_time: String?
318
- attr_reader author: String?
319
- attr_reader section: String?
320
- attr_reader tags: Array[String]
319
+ class InteractionResult
320
+ attr_reader action_results: Array[ActionResult]
321
+ attr_reader final_html: String
322
+ attr_reader final_url: String
323
+ attr_reader screenshot_base64: String?
321
324
 
322
- def initialize: (?published_time: String, ?modified_time: String, ?author: String, ?section: String, ?tags: Array[String]) -> void
325
+ def initialize: (?action_results: Array[ActionResult], ?final_html: String, ?final_url: String, ?screenshot_base64: String) -> void
323
326
  end
324
327
 
325
- class HreflangEntry
326
- attr_reader lang: String
327
- attr_reader url: String
328
+ class JsonLdEntry
329
+ attr_reader schema_type: String
330
+ attr_reader name: String?
331
+ attr_reader raw: String
328
332
 
329
- def initialize: (?lang: String, ?url: String) -> void
333
+ def initialize: (?schema_type: String, ?name: String, ?raw: String) -> void
330
334
  end
331
335
 
332
- class FaviconInfo
336
+ class LinkInfo
333
337
  attr_reader url: String
334
- attr_reader rel: String
335
- attr_reader sizes: String?
336
- attr_reader mime_type: String?
338
+ attr_reader text: String
339
+ attr_reader link_type: LinkType
340
+ attr_reader rel: String?
341
+ attr_reader nofollow: bool
337
342
 
338
- def initialize: (?url: String, ?rel: String, ?sizes: String, ?mime_type: String) -> void
343
+ def initialize: (?url: String, ?text: String, ?link_type: LinkType, ?rel: String, ?nofollow: bool) -> void
339
344
  end
340
345
 
341
- class HeadingInfo
342
- attr_reader level: Integer
343
- attr_reader text: String
346
+ class MapResult
347
+ attr_reader urls: Array[SitemapUrl]
344
348
 
345
- def initialize: (?level: Integer, ?text: String) -> void
349
+ def initialize: (?urls: Array[SitemapUrl]) -> void
346
350
  end
347
351
 
348
- class ResponseMeta
349
- attr_reader etag: String?
350
- attr_reader last_modified: String?
351
- attr_reader cache_control: String?
352
- attr_reader server: String?
353
- attr_reader x_powered_by: String?
354
- attr_reader content_language: String?
355
- attr_reader content_encoding: String?
352
+ class MarkdownResult
353
+ attr_reader content: String
354
+ attr_reader document_structure: String?
355
+ attr_reader tables: Array[String]
356
+ attr_reader warnings: Array[String]
357
+ attr_reader citations: bool
358
+ attr_reader fit_content: String?
356
359
 
357
- def initialize: (?etag: String, ?last_modified: String, ?cache_control: String, ?server: String, ?x_powered_by: String, ?content_language: String, ?content_encoding: String) -> void
360
+ def initialize: (?content: String, ?document_structure: String, ?tables: Array[String], ?warnings: Array[String], ?citations: bool, ?fit_content: String) -> void
358
361
  end
359
362
 
360
363
  class PageMetadata
@@ -405,70 +408,67 @@ module Crawlberg
405
408
  def initialize: (?title: String, ?description: String, ?canonical_url: String, ?keywords: String, ?author: String, ?viewport: String, ?theme_color: String, ?generator: String, ?robots: String, ?html_lang: String, ?html_dir: String, ?og_title: String, ?og_type: String, ?og_image: String, ?og_description: String, ?og_url: String, ?og_site_name: String, ?og_locale: String, ?og_video: String, ?og_audio: String, ?og_locale_alternates: Array[String], ?twitter_card: String, ?twitter_title: String, ?twitter_description: String, ?twitter_image: String, ?twitter_site: String, ?twitter_creator: String, ?dc_title: String, ?dc_creator: String, ?dc_subject: String, ?dc_description: String, ?dc_publisher: String, ?dc_date: String, ?dc_type: String, ?dc_format: String, ?dc_identifier: String, ?dc_language: String, ?dc_rights: String, ?article: ArticleMetadata, ?hreflangs: Array[HreflangEntry], ?favicons: Array[FaviconInfo], ?headings: Array[HeadingInfo], ?word_count: Integer) -> void
406
409
  end
407
410
 
408
- class CrawlStreamRequest
411
+ class ProxyConfig
409
412
  attr_reader url: String
413
+ attr_reader username: String?
414
+ attr_reader password: String?
410
415
 
411
- def initialize: (?url: String) -> void
412
- end
413
-
414
- class BatchCrawlStreamRequest
415
- attr_reader urls: Array[String]
416
-
417
- def initialize: (?urls: Array[String]) -> void
418
- end
419
-
420
- class CitationResult
421
- attr_reader content: String
422
- attr_reader references: Array[CitationReference]
423
-
424
- def initialize: (?content: String, ?references: Array[CitationReference]) -> void
416
+ def initialize: (?url: String, ?username: String, ?password: String) -> void
425
417
  end
426
418
 
427
- class CitationReference
428
- attr_reader index: Integer
429
- attr_reader url: String
430
- attr_reader text: String
431
-
432
- def initialize: (?index: Integer, ?url: String, ?text: String) -> void
433
- end
419
+ class ResponseMeta
420
+ attr_reader etag: String?
421
+ attr_reader last_modified: String?
422
+ attr_reader cache_control: String?
423
+ attr_reader server: String?
424
+ attr_reader x_powered_by: String?
425
+ attr_reader content_language: String?
426
+ attr_reader content_encoding: String?
434
427
 
435
- class CrawlEngineHandle
436
- def crawl_stream: (CrawlStreamRequest req) -> Enumerator[CrawlEvent]
437
- def batch_crawl_stream: (BatchCrawlStreamRequest req) -> Enumerator[CrawlEvent]
428
+ def initialize: (?etag: String, ?last_modified: String, ?cache_control: String, ?server: String, ?x_powered_by: String, ?content_language: String, ?content_encoding: String) -> void
438
429
  end
439
430
 
440
- class BatchScrapeResult
441
- attr_reader url: String
442
- attr_reader result: ScrapeResult?
443
- attr_reader error: String?
431
+ class ScrapeResult
432
+ attr_reader status_code: Integer
433
+ attr_reader final_url: String
434
+ attr_reader content_type: String
435
+ attr_reader html: String
436
+ attr_reader body_size: Integer
437
+ attr_reader metadata: PageMetadata
438
+ attr_reader links: Array[LinkInfo]
439
+ attr_reader images: Array[ImageInfo]
440
+ attr_reader feeds: Array[FeedInfo]
441
+ attr_reader json_ld: Array[JsonLdEntry]
442
+ attr_reader is_allowed: bool
443
+ attr_reader crawl_delay: Integer?
444
+ attr_reader noindex_detected: bool
445
+ attr_reader nofollow_detected: bool
446
+ attr_reader x_robots_tag: String?
447
+ attr_reader is_pdf: bool
448
+ attr_reader was_skipped: bool
449
+ attr_reader detected_charset: String?
450
+ attr_reader auth_header_sent: bool
451
+ attr_reader response_meta: ResponseMeta?
452
+ attr_reader assets: Array[DownloadedAsset]
453
+ attr_reader js_render_hint: bool
454
+ attr_reader browser_used: bool
455
+ attr_reader markdown: MarkdownResult?
456
+ attr_reader extracted_data: String?
457
+ attr_reader extraction_meta: ExtractionMeta?
458
+ attr_reader screenshot_base64: String?
459
+ attr_reader downloaded_document: DownloadedDocument?
460
+ attr_reader browser: BrowserExtras?
444
461
 
445
- def initialize: (?url: String, ?result: ScrapeResult, ?error: String) -> void
462
+ def initialize: (?status_code: Integer, ?final_url: String, ?content_type: String, ?html: String, ?body_size: Integer, ?metadata: PageMetadata, ?links: Array[LinkInfo], ?images: Array[ImageInfo], ?feeds: Array[FeedInfo], ?json_ld: Array[JsonLdEntry], ?is_allowed: bool, ?crawl_delay: Integer, ?noindex_detected: bool, ?nofollow_detected: bool, ?x_robots_tag: String, ?is_pdf: bool, ?was_skipped: bool, ?detected_charset: String, ?auth_header_sent: bool, ?response_meta: ResponseMeta, ?assets: Array[DownloadedAsset], ?js_render_hint: bool, ?browser_used: bool, ?markdown: MarkdownResult, ?extracted_data: String, ?extraction_meta: ExtractionMeta, ?screenshot_base64: String, ?downloaded_document: DownloadedDocument, ?browser: BrowserExtras) -> void
446
463
  end
447
464
 
448
- class BatchCrawlResult
465
+ class SitemapUrl
449
466
  attr_reader url: String
450
- attr_reader result: CrawlResult?
451
- attr_reader error: String?
452
-
453
- def initialize: (?url: String, ?result: CrawlResult, ?error: String) -> void
454
- end
455
-
456
- class BatchScrapeResults
457
- attr_reader results: Array[BatchScrapeResult]
458
- attr_reader total_count: Integer
459
- attr_reader completed_count: Integer
460
- attr_reader failed_count: Integer
461
-
462
- def initialize: (?results: Array[BatchScrapeResult], ?total_count: Integer, ?completed_count: Integer, ?failed_count: Integer) -> void
463
- end
464
-
465
- class BatchCrawlResults
466
- attr_reader results: Array[BatchCrawlResult]
467
- attr_reader total_count: Integer
468
- attr_reader completed_count: Integer
469
- attr_reader failed_count: Integer
467
+ attr_reader lastmod: String?
468
+ attr_reader changefreq: String?
469
+ attr_reader priority: String?
470
470
 
471
- def initialize: (?results: Array[BatchCrawlResult], ?total_count: Integer, ?completed_count: Integer, ?failed_count: Integer) -> void
471
+ def initialize: (?url: String, ?lastmod: String, ?changefreq: String, ?priority: String) -> void
472
472
  end
473
473
 
474
474
  class SsrfPolicy
@@ -479,50 +479,53 @@ module Crawlberg
479
479
  def initialize: (?deny_private: bool, ?allowlist: Array[HostMatcher], ?max_redirects: Integer) -> void
480
480
  end
481
481
 
482
- class BrowserMode
483
- type value = :auto | :always | :never | :stealth
482
+ class AssetCategory
483
+ type value = :document | :image | :audio | :video | :font | :stylesheet | :script | :archive | :data | :other
484
484
  end
485
485
 
486
- class BrowserWait
487
- type value = :network_idle | :selector | :fixed
486
+ class AuthConfig
488
487
  end
489
488
 
490
489
  class BrowserBackend
491
490
  type value = :chromiumoxide | :native
492
491
  end
493
492
 
494
- class DocumentContentEncoding
495
- type value = :base64
493
+ class BrowserMode
494
+ type value = :auto | :always | :never | :stealth
496
495
  end
497
496
 
498
- class CrawlStrategyKind
499
- type value = :bfs | :dfs | :best_first | :adaptive
497
+ class BrowserWait
498
+ type value = :network_idle | :selector | :fixed
500
499
  end
501
500
 
502
501
  class ContentFilterKind
503
502
  type value = :bm25
504
503
  end
505
504
 
506
- class AuthConfig
505
+ class CrawlEvent
507
506
  end
508
507
 
509
- class LinkType
510
- type value = :internal | :external | :anchor | :document
508
+ class CrawlStrategyKind
509
+ type value = :bfs | :dfs | :best_first | :adaptive
511
510
  end
512
511
 
513
- class ImageSource
514
- type value = :img | :picture_source | :og:image | :twitter:image
512
+ class DocumentContentEncoding
513
+ type value = :base64
515
514
  end
516
515
 
517
516
  class FeedType
518
517
  type value = :rss | :atom | :json_feed
519
518
  end
520
519
 
521
- class AssetCategory
522
- type value = :document | :image | :audio | :video | :font | :stylesheet | :script | :archive | :data | :other
520
+ class HostMatcher
523
521
  end
524
522
 
525
- class CrawlEvent
523
+ class ImageSource
524
+ type value = :img | :picture_source | :"og:image" | :"twitter:image"
525
+ end
526
+
527
+ class LinkType
528
+ type value = :internal | :external | :anchor | :document
526
529
  end
527
530
 
528
531
  class PageAction
@@ -532,23 +535,20 @@ module Crawlberg
532
535
  type value = :up | :down
533
536
  end
534
537
 
535
- class HostMatcher
536
- end
537
-
538
- def self.generate_citations: (String markdown) -> CitationResult
539
-
540
- def self.create_engine: (?CrawlConfig config) -> CrawlEngineHandle
538
+ def self.batch_crawl: (CrawlEngineHandle engine, Array[String] urls) -> BatchCrawlResults
541
539
 
542
- def self.scrape: (CrawlEngineHandle engine, String url) -> ScrapeResult
540
+ def self.batch_scrape: (CrawlEngineHandle engine, Array[String] urls) -> BatchScrapeResults
543
541
 
544
542
  def self.crawl: (CrawlEngineHandle engine, String url) -> CrawlResult
545
543
 
546
- def self.map_urls: (CrawlEngineHandle engine, String url) -> MapResult
544
+ def self.create_engine: (?CrawlConfig config) -> CrawlEngineHandle
545
+
546
+ def self.generate_citations: (String markdown) -> CitationResult
547
547
 
548
548
  def self.interact: (CrawlEngineHandle engine, String url, Array[PageAction] actions) -> InteractionResult
549
549
 
550
- def self.batch_scrape: (CrawlEngineHandle engine, Array[String] urls) -> BatchScrapeResults
550
+ def self.map_urls: (CrawlEngineHandle engine, String url) -> MapResult
551
551
 
552
- def self.batch_crawl: (CrawlEngineHandle engine, Array[String] urls) -> BatchCrawlResults
552
+ def self.scrape: (CrawlEngineHandle engine, String url) -> ScrapeResult
553
553
 
554
554
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crawlberg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.3
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Xberg Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-08-22 00:00:00.000000000 Z
11
+ date: 2026-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rb_sys