crawlberg 1.2.1 → 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.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/ext/crawlberg_rb/native/Cargo.lock +113 -144
- data/ext/crawlberg_rb/native/Cargo.toml +19 -2
- data/ext/crawlberg_rb/native/extconf.rb +5 -0
- data/ext/crawlberg_rb/src/lib.rs +3627 -3434
- data/lib/crawlberg/native.rb +143 -192
- data/lib/crawlberg/version.rb +3 -3
- data/lib/crawlberg.rb +2 -2
- data/sig/types.rbs +480 -473
- metadata +2 -3
- data/lib/crawlberg_rb.so +0 -0
data/sig/types.rbs
CHANGED
|
@@ -1,547 +1,554 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:71edb0ad11af2e26ac8c388c9aac9e12715a6a126f85a44c69e785b59fe8ad1f
|
|
3
3
|
# To regenerate: alef generate
|
|
4
|
-
# To verify freshness: alef verify
|
|
4
|
+
# To verify freshness: alef verify
|
|
5
5
|
|
|
6
6
|
module Crawlberg
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
VERSION: String
|
|
9
9
|
|
|
10
|
-
type json_value = Hash[String, untyped] | Array[untyped] | String | Integer | Float | bool | nil
|
|
10
|
+
type json_value = Hash[String, untyped] | Array[untyped] | String | Integer | Float | bool | nil
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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: (?
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class ProxyConfig
|
|
23
|
-
attr_accessor url: String?
|
|
24
|
-
attr_accessor username: String?
|
|
25
|
-
attr_accessor password: String?
|
|
26
|
-
|
|
27
|
-
def initialize: (?url: String, ?username: String, ?password: String) -> void
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
class ContentConfig
|
|
31
|
-
attr_accessor output_format: String?
|
|
32
|
-
attr_accessor preprocessing_preset: String?
|
|
33
|
-
attr_accessor remove_navigation: bool?
|
|
34
|
-
attr_accessor remove_forms: bool?
|
|
35
|
-
attr_accessor strip_tags: Array[String]?
|
|
36
|
-
attr_accessor preserve_tags: Array[String]?
|
|
37
|
-
attr_accessor exclude_selectors: Array[String]?
|
|
38
|
-
attr_accessor skip_images: bool?
|
|
39
|
-
attr_accessor max_depth: Integer?
|
|
40
|
-
attr_accessor wrap: bool?
|
|
41
|
-
attr_accessor wrap_width: Integer?
|
|
42
|
-
attr_accessor include_document_structure: bool?
|
|
43
|
-
|
|
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
|
|
45
|
-
def self.default: () -> ContentConfig
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
class BrowserConfig
|
|
49
|
-
attr_accessor mode: BrowserMode?
|
|
50
|
-
attr_accessor backend: BrowserBackend?
|
|
51
|
-
attr_accessor endpoint: String?
|
|
52
|
-
attr_accessor timeout: Integer?
|
|
53
|
-
attr_accessor wait: BrowserWait?
|
|
54
|
-
attr_accessor wait_selector: String?
|
|
55
|
-
attr_accessor extra_wait: Integer?
|
|
56
|
-
attr_accessor proxy: ProxyConfig?
|
|
57
|
-
attr_accessor block_url_patterns: Array[String]?
|
|
58
|
-
attr_accessor eval_script: String?
|
|
59
|
-
attr_accessor robots_user_agent: String?
|
|
60
|
-
attr_accessor capture_network_events: bool?
|
|
61
|
-
attr_accessor session_affinity: bool?
|
|
62
|
-
|
|
63
|
-
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
|
|
64
|
-
def self.default: () -> BrowserConfig
|
|
65
|
-
end
|
|
66
|
-
|
|
67
|
-
class CrawlConfig
|
|
68
|
-
attr_accessor max_depth: Integer?
|
|
69
|
-
attr_accessor max_pages: Integer?
|
|
70
|
-
attr_accessor max_links_per_page: Integer?
|
|
71
|
-
attr_accessor max_concurrent: Integer?
|
|
72
|
-
attr_accessor respect_robots_txt: bool?
|
|
73
|
-
attr_accessor soft_http_errors: bool?
|
|
74
|
-
attr_accessor user_agent: String?
|
|
75
|
-
attr_accessor stay_on_domain: bool?
|
|
76
|
-
attr_accessor allow_subdomains: bool?
|
|
77
|
-
attr_accessor include_paths: Array[String]?
|
|
78
|
-
attr_accessor exclude_paths: Array[String]?
|
|
79
|
-
attr_accessor custom_headers: Hash[String, String]?
|
|
80
|
-
attr_accessor request_timeout: Integer?
|
|
81
|
-
attr_accessor rate_limit_ms: Integer?
|
|
82
|
-
attr_accessor max_redirects: Integer?
|
|
83
|
-
attr_accessor retry_count: Integer?
|
|
84
|
-
attr_accessor retry_codes: Array[Integer]?
|
|
85
|
-
attr_accessor cookies_enabled: bool?
|
|
86
|
-
attr_accessor auth: AuthConfig?
|
|
87
|
-
attr_accessor max_body_size: Integer?
|
|
88
|
-
attr_accessor remove_tags: Array[String]?
|
|
89
|
-
attr_accessor content: ContentConfig?
|
|
90
|
-
attr_accessor map_limit: Integer?
|
|
91
|
-
attr_accessor map_search: String?
|
|
92
|
-
attr_accessor download_assets: bool?
|
|
93
|
-
attr_accessor asset_types: Array[AssetCategory]?
|
|
94
|
-
attr_accessor max_asset_size: Integer?
|
|
95
|
-
attr_accessor browser: BrowserConfig?
|
|
96
|
-
attr_accessor proxy: ProxyConfig?
|
|
97
|
-
attr_accessor user_agents: Array[String]?
|
|
98
|
-
attr_accessor capture_screenshot: bool?
|
|
99
|
-
attr_accessor follow_document_urls: bool?
|
|
100
|
-
attr_accessor document_url_depth: Integer?
|
|
101
|
-
attr_accessor download_documents: bool?
|
|
102
|
-
attr_accessor document_max_size: Integer?
|
|
103
|
-
attr_accessor document_mime_types: Array[String]?
|
|
104
|
-
attr_accessor document_output_dir: String?
|
|
105
|
-
attr_accessor document_content_encoding: DocumentContentEncoding?
|
|
106
|
-
attr_accessor warc_output: String?
|
|
107
|
-
attr_accessor browser_profile: String?
|
|
108
|
-
attr_accessor save_browser_profile: bool?
|
|
109
|
-
attr_accessor ssrf: SsrfPolicy?
|
|
110
|
-
attr_accessor ssrf_deny_private_explicit: bool?
|
|
111
|
-
|
|
112
|
-
def initialize: (?max_depth: Integer, ?max_pages: Integer, ?max_links_per_page: Integer, ?max_concurrent: Integer, ?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
|
|
113
|
-
def validate: () -> void
|
|
114
|
-
def self.default: () -> CrawlConfig
|
|
115
|
-
end
|
|
116
|
-
|
|
117
|
-
class BrowserExtras
|
|
118
|
-
attr_accessor eval_result: json_value?
|
|
119
|
-
attr_accessor network_events: Array[ResponseMeta]?
|
|
120
|
-
attr_accessor cookies: Array[CookieInfo]?
|
|
121
|
-
|
|
122
|
-
def initialize: (?eval_result: json_value, ?network_events: Array[ResponseMeta], ?cookies: Array[CookieInfo]) -> void
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
class DownloadedDocument
|
|
126
|
-
attr_accessor url: String?
|
|
127
|
-
attr_accessor mime_type: String?
|
|
128
|
-
attr_accessor size: Integer?
|
|
129
|
-
attr_accessor filename: String?
|
|
130
|
-
attr_accessor content_hash: String?
|
|
131
|
-
attr_accessor headers: Hash[String, String]?
|
|
132
|
-
attr_accessor truncated: bool?
|
|
133
|
-
attr_accessor content_path: String?
|
|
134
|
-
attr_accessor content_base64: String?
|
|
135
|
-
|
|
136
|
-
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
|
|
137
|
-
end
|
|
138
|
-
|
|
139
|
-
class InteractionResult
|
|
140
|
-
attr_accessor action_results: Array[ActionResult]?
|
|
141
|
-
attr_accessor final_html: String?
|
|
142
|
-
attr_accessor final_url: String?
|
|
143
|
-
attr_accessor screenshot_base64: String?
|
|
144
|
-
|
|
145
|
-
def initialize: (?action_results: Array[ActionResult], ?final_html: String, ?final_url: String, ?screenshot_base64: String) -> void
|
|
146
|
-
end
|
|
147
|
-
|
|
148
|
-
class ActionResult
|
|
149
|
-
attr_accessor action_index: Integer?
|
|
150
|
-
attr_accessor action_type: String?
|
|
151
|
-
attr_accessor success: bool?
|
|
152
|
-
attr_accessor data: json_value?
|
|
153
|
-
attr_accessor error: String?
|
|
154
|
-
|
|
155
|
-
def initialize: (?action_index: Integer, ?action_type: String, ?success: bool, ?data: json_value, ?error: String) -> void
|
|
156
|
-
end
|
|
157
|
-
|
|
158
|
-
class ScrapeResult
|
|
159
|
-
attr_accessor status_code: Integer?
|
|
160
|
-
attr_accessor final_url: String?
|
|
161
|
-
attr_accessor content_type: String?
|
|
162
|
-
attr_accessor html: String?
|
|
163
|
-
attr_accessor body_size: Integer?
|
|
164
|
-
attr_accessor metadata: PageMetadata?
|
|
165
|
-
attr_accessor links: Array[LinkInfo]?
|
|
166
|
-
attr_accessor images: Array[ImageInfo]?
|
|
167
|
-
attr_accessor feeds: Array[FeedInfo]?
|
|
168
|
-
attr_accessor json_ld: Array[JsonLdEntry]?
|
|
169
|
-
attr_accessor is_allowed: bool?
|
|
170
|
-
attr_accessor crawl_delay: Integer?
|
|
171
|
-
attr_accessor noindex_detected: bool?
|
|
172
|
-
attr_accessor nofollow_detected: bool?
|
|
173
|
-
attr_accessor x_robots_tag: String?
|
|
174
|
-
attr_accessor is_pdf: bool?
|
|
175
|
-
attr_accessor was_skipped: bool?
|
|
176
|
-
attr_accessor detected_charset: String?
|
|
177
|
-
attr_accessor auth_header_sent: bool?
|
|
178
|
-
attr_accessor response_meta: ResponseMeta?
|
|
179
|
-
attr_accessor assets: Array[DownloadedAsset]?
|
|
180
|
-
attr_accessor js_render_hint: bool?
|
|
181
|
-
attr_accessor browser_used: bool?
|
|
182
|
-
attr_accessor markdown: MarkdownResult?
|
|
183
|
-
attr_accessor extracted_data: json_value?
|
|
184
|
-
attr_accessor extraction_meta: ExtractionMeta?
|
|
185
|
-
attr_accessor screenshot_base64: String?
|
|
186
|
-
attr_accessor downloaded_document: DownloadedDocument?
|
|
187
|
-
attr_accessor browser: BrowserExtras?
|
|
188
|
-
|
|
189
|
-
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: json_value, ?extraction_meta: ExtractionMeta, ?screenshot_base64: String, ?downloaded_document: DownloadedDocument, ?browser: BrowserExtras) -> void
|
|
190
|
-
end
|
|
191
|
-
|
|
192
|
-
class CrawlPageResult
|
|
193
|
-
attr_accessor url: String?
|
|
194
|
-
attr_accessor normalized_url: String?
|
|
195
|
-
attr_accessor status_code: Integer?
|
|
196
|
-
attr_accessor content_type: String?
|
|
197
|
-
attr_accessor html: String?
|
|
198
|
-
attr_accessor body_size: Integer?
|
|
199
|
-
attr_accessor metadata: PageMetadata?
|
|
200
|
-
attr_accessor links: Array[LinkInfo]?
|
|
201
|
-
attr_accessor images: Array[ImageInfo]?
|
|
202
|
-
attr_accessor feeds: Array[FeedInfo]?
|
|
203
|
-
attr_accessor json_ld: Array[JsonLdEntry]?
|
|
204
|
-
attr_accessor depth: Integer?
|
|
205
|
-
attr_accessor stayed_on_domain: bool?
|
|
206
|
-
attr_accessor was_skipped: bool?
|
|
207
|
-
attr_accessor is_pdf: bool?
|
|
208
|
-
attr_accessor detected_charset: String?
|
|
209
|
-
attr_accessor markdown: MarkdownResult?
|
|
210
|
-
attr_accessor extracted_data: json_value?
|
|
211
|
-
attr_accessor extraction_meta: ExtractionMeta?
|
|
212
|
-
attr_accessor downloaded_document: DownloadedDocument?
|
|
213
|
-
attr_accessor browser_used: bool?
|
|
214
|
-
|
|
215
|
-
def initialize: (?url: String, ?normalized_url: String, ?status_code: Integer, ?content_type: String, ?html: String, ?body_size: Integer, ?metadata: PageMetadata, ?links: Array[LinkInfo], ?images: Array[ImageInfo], ?feeds: Array[FeedInfo], ?json_ld: Array[JsonLdEntry], ?depth: Integer, ?stayed_on_domain: bool, ?was_skipped: bool, ?is_pdf: bool, ?detected_charset: String, ?markdown: MarkdownResult, ?extracted_data: json_value, ?extraction_meta: ExtractionMeta, ?downloaded_document: DownloadedDocument, ?browser_used: bool) -> void
|
|
216
|
-
end
|
|
217
|
-
|
|
218
|
-
class CrawlResult
|
|
219
|
-
attr_accessor pages: Array[CrawlPageResult]?
|
|
220
|
-
attr_accessor final_url: String?
|
|
221
|
-
attr_accessor redirect_count: Integer?
|
|
222
|
-
attr_accessor was_skipped: bool?
|
|
223
|
-
attr_accessor error: String?
|
|
224
|
-
attr_accessor cookies: Array[CookieInfo]?
|
|
225
|
-
attr_accessor stayed_on_domain: bool?
|
|
226
|
-
attr_accessor browser_used: bool?
|
|
227
|
-
|
|
228
|
-
def initialize: (?pages: Array[CrawlPageResult], ?final_url: String, ?redirect_count: Integer, ?was_skipped: bool, ?error: String, ?cookies: Array[CookieInfo], ?stayed_on_domain: bool, ?browser_used: bool) -> void
|
|
229
|
-
def unique_normalized_urls: () -> Integer
|
|
230
|
-
end
|
|
231
|
-
|
|
232
|
-
class SitemapUrl
|
|
233
|
-
attr_accessor url: String?
|
|
234
|
-
attr_accessor lastmod: String?
|
|
235
|
-
attr_accessor changefreq: String?
|
|
236
|
-
attr_accessor priority: String?
|
|
237
|
-
|
|
238
|
-
def initialize: (?url: String, ?lastmod: String, ?changefreq: String, ?priority: String) -> void
|
|
239
|
-
end
|
|
240
|
-
|
|
241
|
-
class MapResult
|
|
242
|
-
attr_accessor urls: Array[SitemapUrl]?
|
|
243
|
-
|
|
244
|
-
def initialize: (?urls: Array[SitemapUrl]) -> void
|
|
245
|
-
end
|
|
19
|
+
def initialize: (?action_index: Integer, ?action_type: String, ?success: bool, ?data: String, ?error: String) -> void
|
|
20
|
+
end
|
|
246
21
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
attr_accessor fit_content: String?
|
|
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]
|
|
254
28
|
|
|
255
|
-
def initialize: (?
|
|
256
|
-
|
|
29
|
+
def initialize: (?published_time: String, ?modified_time: String, ?author: String, ?section: String, ?tags: Array[String]) -> void
|
|
30
|
+
end
|
|
257
31
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
attr_accessor rel: String?
|
|
263
|
-
attr_accessor nofollow: bool?
|
|
32
|
+
class BatchCrawlResult
|
|
33
|
+
attr_reader url: String
|
|
34
|
+
attr_reader result: CrawlResult?
|
|
35
|
+
attr_reader error: String?
|
|
264
36
|
|
|
265
|
-
def initialize: (?url: String, ?
|
|
266
|
-
|
|
37
|
+
def initialize: (?url: String, ?result: CrawlResult, ?error: String) -> void
|
|
38
|
+
end
|
|
267
39
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
attr_accessor source: ImageSource?
|
|
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
|
|
274
45
|
|
|
275
|
-
def initialize: (?
|
|
276
|
-
|
|
46
|
+
def initialize: (?results: Array[BatchCrawlResult], ?total_count: Integer, ?completed_count: Integer, ?failed_count: Integer) -> void
|
|
47
|
+
end
|
|
277
48
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
attr_accessor title: String?
|
|
281
|
-
attr_accessor feed_type: FeedType?
|
|
49
|
+
class BatchCrawlStreamRequest
|
|
50
|
+
attr_reader urls: Array[String]
|
|
282
51
|
|
|
283
|
-
def initialize: (?
|
|
284
|
-
|
|
52
|
+
def initialize: (?urls: Array[String]) -> void
|
|
53
|
+
end
|
|
285
54
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
55
|
+
class BatchScrapeResult
|
|
56
|
+
attr_reader url: String
|
|
57
|
+
attr_reader result: ScrapeResult?
|
|
58
|
+
attr_reader error: String?
|
|
290
59
|
|
|
291
|
-
def initialize: (?
|
|
292
|
-
|
|
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
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
class BrowserConfig
|
|
73
|
+
attr_reader mode: BrowserMode
|
|
74
|
+
attr_reader backend: BrowserBackend
|
|
75
|
+
attr_reader endpoint: String?
|
|
76
|
+
attr_reader timeout: Integer
|
|
77
|
+
attr_reader wait: BrowserWait
|
|
78
|
+
attr_reader wait_selector: String?
|
|
79
|
+
attr_reader extra_wait: Integer?
|
|
80
|
+
attr_reader proxy: ProxyConfig?
|
|
81
|
+
attr_reader block_url_patterns: Array[String]
|
|
82
|
+
attr_reader eval_script: String?
|
|
83
|
+
attr_reader robots_user_agent: String?
|
|
84
|
+
attr_reader capture_network_events: bool
|
|
85
|
+
attr_reader session_affinity: bool
|
|
86
|
+
|
|
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
|
|
88
|
+
end
|
|
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
|
|
293
102
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
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?
|
|
299
135
|
|
|
300
136
|
def initialize: (?name: String, ?value: String, ?domain: String, ?path: String) -> void
|
|
301
|
-
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
class CrawlConfig
|
|
140
|
+
attr_reader max_depth: Integer?
|
|
141
|
+
attr_reader max_pages: Integer?
|
|
142
|
+
attr_reader max_links_per_page: Integer?
|
|
143
|
+
attr_reader max_concurrent: Integer?
|
|
144
|
+
attr_reader crawl_strategy: CrawlStrategyKind
|
|
145
|
+
attr_reader content_filter: ContentFilterKind?
|
|
146
|
+
attr_reader bm25_query: String?
|
|
147
|
+
attr_reader bm25_threshold: Float?
|
|
148
|
+
attr_reader respect_robots_txt: bool
|
|
149
|
+
attr_reader soft_http_errors: bool
|
|
150
|
+
attr_reader user_agent: String?
|
|
151
|
+
attr_reader stay_on_domain: bool
|
|
152
|
+
attr_reader allow_subdomains: bool
|
|
153
|
+
attr_reader include_paths: Array[String]
|
|
154
|
+
attr_reader exclude_paths: Array[String]
|
|
155
|
+
attr_reader custom_headers: Hash[String, String]
|
|
156
|
+
attr_reader request_timeout: Integer
|
|
157
|
+
attr_reader rate_limit_ms: Integer?
|
|
158
|
+
attr_reader max_redirects: Integer
|
|
159
|
+
attr_reader retry_count: Integer
|
|
160
|
+
attr_reader retry_codes: Array[Integer]
|
|
161
|
+
attr_reader cookies_enabled: bool
|
|
162
|
+
attr_reader auth: AuthConfig?
|
|
163
|
+
attr_reader max_body_size: Integer?
|
|
164
|
+
attr_reader remove_tags: Array[String]
|
|
165
|
+
attr_reader content: ContentConfig
|
|
166
|
+
attr_reader map_limit: Integer?
|
|
167
|
+
attr_reader map_search: String?
|
|
168
|
+
attr_reader download_assets: bool
|
|
169
|
+
attr_reader asset_types: Array[AssetCategory]
|
|
170
|
+
attr_reader max_asset_size: Integer?
|
|
171
|
+
attr_reader browser: BrowserConfig
|
|
172
|
+
attr_reader proxy: ProxyConfig?
|
|
173
|
+
attr_reader user_agents: Array[String]
|
|
174
|
+
attr_reader capture_screenshot: bool
|
|
175
|
+
attr_reader follow_document_urls: bool
|
|
176
|
+
attr_reader document_url_depth: Integer?
|
|
177
|
+
attr_reader download_documents: bool
|
|
178
|
+
attr_reader document_max_size: Integer?
|
|
179
|
+
attr_reader document_mime_types: Array[String]
|
|
180
|
+
attr_reader document_output_dir: String?
|
|
181
|
+
attr_reader document_content_encoding: DocumentContentEncoding?
|
|
182
|
+
attr_reader warc_output: String?
|
|
183
|
+
attr_reader browser_profile: String?
|
|
184
|
+
attr_reader save_browser_profile: bool
|
|
185
|
+
attr_reader ssrf: SsrfPolicy
|
|
186
|
+
attr_reader ssrf_deny_private_explicit: bool?
|
|
187
|
+
|
|
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
|
|
189
|
+
def validate: () -> void
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
class CrawlEngineHandle
|
|
193
|
+
def crawl_stream: (CrawlStreamRequest req) -> Enumerator[CrawlEvent]
|
|
194
|
+
def batch_crawl_stream: (BatchCrawlStreamRequest req) -> Enumerator[CrawlEvent]
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
class CrawlPageResult
|
|
198
|
+
attr_reader url: String
|
|
199
|
+
attr_reader normalized_url: String
|
|
200
|
+
attr_reader status_code: Integer
|
|
201
|
+
attr_reader content_type: String
|
|
202
|
+
attr_reader html: String
|
|
203
|
+
attr_reader body_size: Integer
|
|
204
|
+
attr_reader metadata: PageMetadata
|
|
205
|
+
attr_reader links: Array[LinkInfo]
|
|
206
|
+
attr_reader images: Array[ImageInfo]
|
|
207
|
+
attr_reader feeds: Array[FeedInfo]
|
|
208
|
+
attr_reader json_ld: Array[JsonLdEntry]
|
|
209
|
+
attr_reader depth: Integer
|
|
210
|
+
attr_reader stayed_on_domain: bool
|
|
211
|
+
attr_reader was_skipped: bool
|
|
212
|
+
attr_reader is_pdf: bool
|
|
213
|
+
attr_reader detected_charset: String?
|
|
214
|
+
attr_reader markdown: MarkdownResult?
|
|
215
|
+
attr_reader extracted_data: String?
|
|
216
|
+
attr_reader extraction_meta: ExtractionMeta?
|
|
217
|
+
attr_reader downloaded_document: DownloadedDocument?
|
|
218
|
+
attr_reader browser_used: bool
|
|
219
|
+
|
|
220
|
+
def initialize: (?url: String, ?normalized_url: String, ?status_code: Integer, ?content_type: String, ?html: String, ?body_size: Integer, ?metadata: PageMetadata, ?links: Array[LinkInfo], ?images: Array[ImageInfo], ?feeds: Array[FeedInfo], ?json_ld: Array[JsonLdEntry], ?depth: Integer, ?stayed_on_domain: bool, ?was_skipped: bool, ?is_pdf: bool, ?detected_charset: String, ?markdown: MarkdownResult, ?extracted_data: String, ?extraction_meta: ExtractionMeta, ?downloaded_document: DownloadedDocument, ?browser_used: bool) -> void
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
class CrawlResult
|
|
224
|
+
attr_reader pages: Array[CrawlPageResult]
|
|
225
|
+
attr_reader final_url: String
|
|
226
|
+
attr_reader redirect_count: Integer
|
|
227
|
+
attr_reader was_skipped: bool
|
|
228
|
+
attr_reader error: String?
|
|
229
|
+
attr_reader cookies: Array[CookieInfo]
|
|
230
|
+
attr_reader stayed_on_domain: bool
|
|
231
|
+
attr_reader browser_used: bool
|
|
232
|
+
|
|
233
|
+
def initialize: (?pages: Array[CrawlPageResult], ?final_url: String, ?redirect_count: Integer, ?was_skipped: bool, ?error: String, ?cookies: Array[CookieInfo], ?stayed_on_domain: bool, ?browser_used: bool) -> void
|
|
234
|
+
def unique_normalized_urls: () -> Integer
|
|
235
|
+
end
|
|
302
236
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
attr_accessor content_hash: String?
|
|
306
|
-
attr_accessor mime_type: String?
|
|
307
|
-
attr_accessor size: Integer?
|
|
308
|
-
attr_accessor asset_category: AssetCategory?
|
|
309
|
-
attr_accessor html_tag: String?
|
|
237
|
+
class CrawlStreamRequest
|
|
238
|
+
attr_reader url: String
|
|
310
239
|
|
|
311
|
-
def initialize: (?url: String
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
class ArticleMetadata
|
|
315
|
-
attr_accessor published_time: String?
|
|
316
|
-
attr_accessor modified_time: String?
|
|
317
|
-
attr_accessor author: String?
|
|
318
|
-
attr_accessor section: String?
|
|
319
|
-
attr_accessor tags: Array[String]?
|
|
240
|
+
def initialize: (?url: String) -> void
|
|
241
|
+
end
|
|
320
242
|
|
|
321
|
-
|
|
322
|
-
|
|
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?
|
|
323
250
|
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
251
|
+
def initialize: (?url: String, ?content_hash: String, ?mime_type: String, ?size: Integer, ?asset_category: AssetCategory, ?html_tag: String) -> void
|
|
252
|
+
end
|
|
253
|
+
|
|
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?
|
|
264
|
+
|
|
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
|
|
266
|
+
end
|
|
267
|
+
|
|
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
|
|
327
274
|
|
|
328
|
-
def initialize: (?
|
|
329
|
-
|
|
275
|
+
def initialize: (?cost: Float, ?prompt_tokens: Integer, ?completion_tokens: Integer, ?model: String, ?chunks_processed: Integer) -> void
|
|
276
|
+
end
|
|
330
277
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
278
|
+
class FaviconInfo
|
|
279
|
+
attr_reader url: String
|
|
280
|
+
attr_reader rel: String
|
|
281
|
+
attr_reader sizes: String?
|
|
282
|
+
attr_reader mime_type: String?
|
|
336
283
|
|
|
337
284
|
def initialize: (?url: String, ?rel: String, ?sizes: String, ?mime_type: String) -> void
|
|
338
|
-
|
|
285
|
+
end
|
|
339
286
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
287
|
+
class FeedInfo
|
|
288
|
+
attr_reader url: String
|
|
289
|
+
attr_reader title: String?
|
|
290
|
+
attr_reader feed_type: FeedType
|
|
343
291
|
|
|
344
|
-
def initialize: (?
|
|
345
|
-
|
|
292
|
+
def initialize: (?url: String, ?title: String, ?feed_type: FeedType) -> void
|
|
293
|
+
end
|
|
346
294
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
attr_accessor cache_control: String?
|
|
351
|
-
attr_accessor server: String?
|
|
352
|
-
attr_accessor x_powered_by: String?
|
|
353
|
-
attr_accessor content_language: String?
|
|
354
|
-
attr_accessor content_encoding: String?
|
|
295
|
+
class HeadingInfo
|
|
296
|
+
attr_reader level: Integer
|
|
297
|
+
attr_reader text: String
|
|
355
298
|
|
|
356
|
-
def initialize: (?
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
class PageMetadata
|
|
360
|
-
attr_accessor title: String?
|
|
361
|
-
attr_accessor description: String?
|
|
362
|
-
attr_accessor canonical_url: String?
|
|
363
|
-
attr_accessor keywords: String?
|
|
364
|
-
attr_accessor author: String?
|
|
365
|
-
attr_accessor viewport: String?
|
|
366
|
-
attr_accessor theme_color: String?
|
|
367
|
-
attr_accessor generator: String?
|
|
368
|
-
attr_accessor robots: String?
|
|
369
|
-
attr_accessor html_lang: String?
|
|
370
|
-
attr_accessor html_dir: String?
|
|
371
|
-
attr_accessor og_title: String?
|
|
372
|
-
attr_accessor og_type: String?
|
|
373
|
-
attr_accessor og_image: String?
|
|
374
|
-
attr_accessor og_description: String?
|
|
375
|
-
attr_accessor og_url: String?
|
|
376
|
-
attr_accessor og_site_name: String?
|
|
377
|
-
attr_accessor og_locale: String?
|
|
378
|
-
attr_accessor og_video: String?
|
|
379
|
-
attr_accessor og_audio: String?
|
|
380
|
-
attr_accessor og_locale_alternates: Array[String]?
|
|
381
|
-
attr_accessor twitter_card: String?
|
|
382
|
-
attr_accessor twitter_title: String?
|
|
383
|
-
attr_accessor twitter_description: String?
|
|
384
|
-
attr_accessor twitter_image: String?
|
|
385
|
-
attr_accessor twitter_site: String?
|
|
386
|
-
attr_accessor twitter_creator: String?
|
|
387
|
-
attr_accessor dc_title: String?
|
|
388
|
-
attr_accessor dc_creator: String?
|
|
389
|
-
attr_accessor dc_subject: String?
|
|
390
|
-
attr_accessor dc_description: String?
|
|
391
|
-
attr_accessor dc_publisher: String?
|
|
392
|
-
attr_accessor dc_date: String?
|
|
393
|
-
attr_accessor dc_type: String?
|
|
394
|
-
attr_accessor dc_format: String?
|
|
395
|
-
attr_accessor dc_identifier: String?
|
|
396
|
-
attr_accessor dc_language: String?
|
|
397
|
-
attr_accessor dc_rights: String?
|
|
398
|
-
attr_accessor article: ArticleMetadata?
|
|
399
|
-
attr_accessor hreflangs: Array[HreflangEntry]?
|
|
400
|
-
attr_accessor favicons: Array[FaviconInfo]?
|
|
401
|
-
attr_accessor headings: Array[HeadingInfo]?
|
|
402
|
-
attr_accessor word_count: Integer?
|
|
403
|
-
|
|
404
|
-
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
|
|
405
|
-
end
|
|
406
|
-
|
|
407
|
-
class CrawlStreamRequest
|
|
408
|
-
attr_accessor url: String?
|
|
299
|
+
def initialize: (?level: Integer, ?text: String) -> void
|
|
300
|
+
end
|
|
409
301
|
|
|
410
|
-
|
|
411
|
-
|
|
302
|
+
class HreflangEntry
|
|
303
|
+
attr_reader lang: String
|
|
304
|
+
attr_reader url: String
|
|
412
305
|
|
|
413
|
-
|
|
414
|
-
|
|
306
|
+
def initialize: (?lang: String, ?url: String) -> void
|
|
307
|
+
end
|
|
415
308
|
|
|
416
|
-
|
|
417
|
-
|
|
309
|
+
class ImageInfo
|
|
310
|
+
attr_reader url: String
|
|
311
|
+
attr_reader alt: String?
|
|
312
|
+
attr_reader width: Integer?
|
|
313
|
+
attr_reader height: Integer?
|
|
314
|
+
attr_reader source: ImageSource
|
|
418
315
|
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
attr_accessor references: Array[CitationReference]?
|
|
316
|
+
def initialize: (?url: String, ?alt: String, ?width: Integer, ?height: Integer, ?source: ImageSource) -> void
|
|
317
|
+
end
|
|
422
318
|
|
|
423
|
-
|
|
424
|
-
|
|
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?
|
|
425
324
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
attr_accessor url: String?
|
|
429
|
-
attr_accessor text: String?
|
|
325
|
+
def initialize: (?action_results: Array[ActionResult], ?final_html: String, ?final_url: String, ?screenshot_base64: String) -> void
|
|
326
|
+
end
|
|
430
327
|
|
|
431
|
-
|
|
432
|
-
|
|
328
|
+
class JsonLdEntry
|
|
329
|
+
attr_reader schema_type: String
|
|
330
|
+
attr_reader name: String?
|
|
331
|
+
attr_reader raw: String
|
|
433
332
|
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
def batch_crawl_stream: (BatchCrawlStreamRequest req) -> Enumerator[CrawlEvent]
|
|
437
|
-
end
|
|
333
|
+
def initialize: (?schema_type: String, ?name: String, ?raw: String) -> void
|
|
334
|
+
end
|
|
438
335
|
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
336
|
+
class LinkInfo
|
|
337
|
+
attr_reader url: String
|
|
338
|
+
attr_reader text: String
|
|
339
|
+
attr_reader link_type: LinkType
|
|
340
|
+
attr_reader rel: String?
|
|
341
|
+
attr_reader nofollow: bool
|
|
443
342
|
|
|
444
|
-
def initialize: (?url: String, ?
|
|
445
|
-
|
|
343
|
+
def initialize: (?url: String, ?text: String, ?link_type: LinkType, ?rel: String, ?nofollow: bool) -> void
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
class MapResult
|
|
347
|
+
attr_reader urls: Array[SitemapUrl]
|
|
348
|
+
|
|
349
|
+
def initialize: (?urls: Array[SitemapUrl]) -> void
|
|
350
|
+
end
|
|
351
|
+
|
|
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?
|
|
359
|
+
|
|
360
|
+
def initialize: (?content: String, ?document_structure: String, ?tables: Array[String], ?warnings: Array[String], ?citations: bool, ?fit_content: String) -> void
|
|
361
|
+
end
|
|
362
|
+
|
|
363
|
+
class PageMetadata
|
|
364
|
+
attr_reader title: String?
|
|
365
|
+
attr_reader description: String?
|
|
366
|
+
attr_reader canonical_url: String?
|
|
367
|
+
attr_reader keywords: String?
|
|
368
|
+
attr_reader author: String?
|
|
369
|
+
attr_reader viewport: String?
|
|
370
|
+
attr_reader theme_color: String?
|
|
371
|
+
attr_reader generator: String?
|
|
372
|
+
attr_reader robots: String?
|
|
373
|
+
attr_reader html_lang: String?
|
|
374
|
+
attr_reader html_dir: String?
|
|
375
|
+
attr_reader og_title: String?
|
|
376
|
+
attr_reader og_type: String?
|
|
377
|
+
attr_reader og_image: String?
|
|
378
|
+
attr_reader og_description: String?
|
|
379
|
+
attr_reader og_url: String?
|
|
380
|
+
attr_reader og_site_name: String?
|
|
381
|
+
attr_reader og_locale: String?
|
|
382
|
+
attr_reader og_video: String?
|
|
383
|
+
attr_reader og_audio: String?
|
|
384
|
+
attr_reader og_locale_alternates: Array[String]?
|
|
385
|
+
attr_reader twitter_card: String?
|
|
386
|
+
attr_reader twitter_title: String?
|
|
387
|
+
attr_reader twitter_description: String?
|
|
388
|
+
attr_reader twitter_image: String?
|
|
389
|
+
attr_reader twitter_site: String?
|
|
390
|
+
attr_reader twitter_creator: String?
|
|
391
|
+
attr_reader dc_title: String?
|
|
392
|
+
attr_reader dc_creator: String?
|
|
393
|
+
attr_reader dc_subject: String?
|
|
394
|
+
attr_reader dc_description: String?
|
|
395
|
+
attr_reader dc_publisher: String?
|
|
396
|
+
attr_reader dc_date: String?
|
|
397
|
+
attr_reader dc_type: String?
|
|
398
|
+
attr_reader dc_format: String?
|
|
399
|
+
attr_reader dc_identifier: String?
|
|
400
|
+
attr_reader dc_language: String?
|
|
401
|
+
attr_reader dc_rights: String?
|
|
402
|
+
attr_reader article: ArticleMetadata?
|
|
403
|
+
attr_reader hreflangs: Array[HreflangEntry]?
|
|
404
|
+
attr_reader favicons: Array[FaviconInfo]?
|
|
405
|
+
attr_reader headings: Array[HeadingInfo]?
|
|
406
|
+
attr_reader word_count: Integer?
|
|
407
|
+
|
|
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
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
class ProxyConfig
|
|
412
|
+
attr_reader url: String
|
|
413
|
+
attr_reader username: String?
|
|
414
|
+
attr_reader password: String?
|
|
446
415
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
attr_accessor result: CrawlResult?
|
|
450
|
-
attr_accessor error: String?
|
|
416
|
+
def initialize: (?url: String, ?username: String, ?password: String) -> void
|
|
417
|
+
end
|
|
451
418
|
|
|
452
|
-
|
|
453
|
-
|
|
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?
|
|
454
427
|
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
428
|
+
def initialize: (?etag: String, ?last_modified: String, ?cache_control: String, ?server: String, ?x_powered_by: String, ?content_language: String, ?content_encoding: String) -> void
|
|
429
|
+
end
|
|
430
|
+
|
|
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?
|
|
461
|
+
|
|
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
|
|
463
|
+
end
|
|
464
|
+
|
|
465
|
+
class SitemapUrl
|
|
466
|
+
attr_reader url: String
|
|
467
|
+
attr_reader lastmod: String?
|
|
468
|
+
attr_reader changefreq: String?
|
|
469
|
+
attr_reader priority: String?
|
|
460
470
|
|
|
461
|
-
def initialize: (?
|
|
462
|
-
|
|
471
|
+
def initialize: (?url: String, ?lastmod: String, ?changefreq: String, ?priority: String) -> void
|
|
472
|
+
end
|
|
463
473
|
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
attr_accessor failed_count: Integer?
|
|
474
|
+
class SsrfPolicy
|
|
475
|
+
attr_reader deny_private: bool
|
|
476
|
+
attr_reader allowlist: Array[HostMatcher]
|
|
477
|
+
attr_reader max_redirects: Integer
|
|
469
478
|
|
|
470
|
-
def initialize: (?
|
|
471
|
-
|
|
479
|
+
def initialize: (?deny_private: bool, ?allowlist: Array[HostMatcher], ?max_redirects: Integer) -> void
|
|
480
|
+
end
|
|
472
481
|
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
attr_accessor max_redirects: Integer?
|
|
482
|
+
class AssetCategory
|
|
483
|
+
type value = :document | :image | :audio | :video | :font | :stylesheet | :script | :archive | :data | :other
|
|
484
|
+
end
|
|
477
485
|
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
def self.from_env: () -> SsrfPolicy
|
|
481
|
-
end
|
|
486
|
+
class AuthConfig
|
|
487
|
+
end
|
|
482
488
|
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
489
|
+
class BrowserBackend
|
|
490
|
+
type value = :chromiumoxide | :native
|
|
491
|
+
end
|
|
486
492
|
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
493
|
+
class BrowserMode
|
|
494
|
+
type value = :auto | :always | :never | :stealth
|
|
495
|
+
end
|
|
490
496
|
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
497
|
+
class BrowserWait
|
|
498
|
+
type value = :network_idle | :selector | :fixed
|
|
499
|
+
end
|
|
494
500
|
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
501
|
+
class ContentFilterKind
|
|
502
|
+
type value = :bm25
|
|
503
|
+
end
|
|
498
504
|
|
|
499
|
-
|
|
500
|
-
|
|
505
|
+
class CrawlEvent
|
|
506
|
+
end
|
|
501
507
|
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
508
|
+
class CrawlStrategyKind
|
|
509
|
+
type value = :bfs | :dfs | :best_first | :adaptive
|
|
510
|
+
end
|
|
505
511
|
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
512
|
+
class DocumentContentEncoding
|
|
513
|
+
type value = :base64
|
|
514
|
+
end
|
|
509
515
|
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
516
|
+
class FeedType
|
|
517
|
+
type value = :rss | :atom | :json_feed
|
|
518
|
+
end
|
|
513
519
|
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
end
|
|
520
|
+
class HostMatcher
|
|
521
|
+
end
|
|
517
522
|
|
|
518
|
-
|
|
519
|
-
|
|
523
|
+
class ImageSource
|
|
524
|
+
type value = :img | :picture_source | :"og:image" | :"twitter:image"
|
|
525
|
+
end
|
|
520
526
|
|
|
521
|
-
|
|
522
|
-
|
|
527
|
+
class LinkType
|
|
528
|
+
type value = :internal | :external | :anchor | :document
|
|
529
|
+
end
|
|
523
530
|
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
end
|
|
531
|
+
class PageAction
|
|
532
|
+
end
|
|
527
533
|
|
|
528
|
-
|
|
529
|
-
|
|
534
|
+
class ScrollDirection
|
|
535
|
+
type value = :up | :down
|
|
536
|
+
end
|
|
530
537
|
|
|
531
|
-
def self.
|
|
538
|
+
def self.batch_crawl: (CrawlEngineHandle engine, Array[String] urls) -> BatchCrawlResults
|
|
532
539
|
|
|
533
|
-
def self.
|
|
540
|
+
def self.batch_scrape: (CrawlEngineHandle engine, Array[String] urls) -> BatchScrapeResults
|
|
534
541
|
|
|
535
|
-
def self.
|
|
542
|
+
def self.crawl: (CrawlEngineHandle engine, String url) -> CrawlResult
|
|
536
543
|
|
|
537
|
-
def self.
|
|
544
|
+
def self.create_engine: (?CrawlConfig config) -> CrawlEngineHandle
|
|
538
545
|
|
|
539
|
-
def self.
|
|
546
|
+
def self.generate_citations: (String markdown) -> CitationResult
|
|
540
547
|
|
|
541
|
-
def self.interact: (CrawlEngineHandle engine, String url, Array[PageAction] actions) -> InteractionResult
|
|
548
|
+
def self.interact: (CrawlEngineHandle engine, String url, Array[PageAction] actions) -> InteractionResult
|
|
542
549
|
|
|
543
|
-
def self.
|
|
550
|
+
def self.map_urls: (CrawlEngineHandle engine, String url) -> MapResult
|
|
544
551
|
|
|
545
|
-
def self.
|
|
552
|
+
def self.scrape: (CrawlEngineHandle engine, String url) -> ScrapeResult
|
|
546
553
|
|
|
547
554
|
end
|