n8n-nodes-crawl4ai-plus 2.0.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.
Files changed (74) hide show
  1. package/LICENSE +23 -0
  2. package/LICENSE.md +19 -0
  3. package/README.md +157 -0
  4. package/dist/credentials/Crawl4aiApi.credentials.d.ts +7 -0
  5. package/dist/credentials/Crawl4aiApi.credentials.js +242 -0
  6. package/dist/credentials/Crawl4aiApi.credentials.js.map +1 -0
  7. package/dist/nodes/Crawl4aiBasicCrawler/Crawl4aiBasicCrawler.node.d.ts +5 -0
  8. package/dist/nodes/Crawl4aiBasicCrawler/Crawl4aiBasicCrawler.node.js +37 -0
  9. package/dist/nodes/Crawl4aiBasicCrawler/Crawl4aiBasicCrawler.node.js.map +1 -0
  10. package/dist/nodes/Crawl4aiBasicCrawler/actions/crawlMultipleUrls.operation.d.ts +4 -0
  11. package/dist/nodes/Crawl4aiBasicCrawler/actions/crawlMultipleUrls.operation.js +299 -0
  12. package/dist/nodes/Crawl4aiBasicCrawler/actions/crawlMultipleUrls.operation.js.map +1 -0
  13. package/dist/nodes/Crawl4aiBasicCrawler/actions/crawlSingleUrl.operation.d.ts +4 -0
  14. package/dist/nodes/Crawl4aiBasicCrawler/actions/crawlSingleUrl.operation.js +324 -0
  15. package/dist/nodes/Crawl4aiBasicCrawler/actions/crawlSingleUrl.operation.js.map +1 -0
  16. package/dist/nodes/Crawl4aiBasicCrawler/actions/operations.d.ts +8 -0
  17. package/dist/nodes/Crawl4aiBasicCrawler/actions/operations.js +67 -0
  18. package/dist/nodes/Crawl4aiBasicCrawler/actions/operations.js.map +1 -0
  19. package/dist/nodes/Crawl4aiBasicCrawler/actions/processRawHtml.operation.d.ts +4 -0
  20. package/dist/nodes/Crawl4aiBasicCrawler/actions/processRawHtml.operation.js +148 -0
  21. package/dist/nodes/Crawl4aiBasicCrawler/actions/processRawHtml.operation.js.map +1 -0
  22. package/dist/nodes/Crawl4aiBasicCrawler/actions/router.d.ts +2 -0
  23. package/dist/nodes/Crawl4aiBasicCrawler/actions/router.js +37 -0
  24. package/dist/nodes/Crawl4aiBasicCrawler/actions/router.js.map +1 -0
  25. package/dist/nodes/Crawl4aiBasicCrawler/crawl4ai.svg +17 -0
  26. package/dist/nodes/Crawl4aiBasicCrawler/helpers/apiClient.d.ts +15 -0
  27. package/dist/nodes/Crawl4aiBasicCrawler/helpers/apiClient.js +226 -0
  28. package/dist/nodes/Crawl4aiBasicCrawler/helpers/apiClient.js.map +1 -0
  29. package/dist/nodes/Crawl4aiBasicCrawler/helpers/formatters.d.ts +5 -0
  30. package/dist/nodes/Crawl4aiBasicCrawler/helpers/formatters.js +81 -0
  31. package/dist/nodes/Crawl4aiBasicCrawler/helpers/formatters.js.map +1 -0
  32. package/dist/nodes/Crawl4aiBasicCrawler/helpers/interfaces.d.ts +189 -0
  33. package/dist/nodes/Crawl4aiBasicCrawler/helpers/interfaces.js +3 -0
  34. package/dist/nodes/Crawl4aiBasicCrawler/helpers/interfaces.js.map +1 -0
  35. package/dist/nodes/Crawl4aiBasicCrawler/helpers/utils.d.ts +8 -0
  36. package/dist/nodes/Crawl4aiBasicCrawler/helpers/utils.js +97 -0
  37. package/dist/nodes/Crawl4aiBasicCrawler/helpers/utils.js.map +1 -0
  38. package/dist/nodes/Crawl4aiContentExtractor/Crawl4aiContentExtractor.node.d.ts +5 -0
  39. package/dist/nodes/Crawl4aiContentExtractor/Crawl4aiContentExtractor.node.js +38 -0
  40. package/dist/nodes/Crawl4aiContentExtractor/Crawl4aiContentExtractor.node.js.map +1 -0
  41. package/dist/nodes/Crawl4aiContentExtractor/actions/cssExtractor.operation.d.ts +4 -0
  42. package/dist/nodes/Crawl4aiContentExtractor/actions/cssExtractor.operation.js +336 -0
  43. package/dist/nodes/Crawl4aiContentExtractor/actions/cssExtractor.operation.js.map +1 -0
  44. package/dist/nodes/Crawl4aiContentExtractor/actions/jsonExtractor.operation.d.ts +4 -0
  45. package/dist/nodes/Crawl4aiContentExtractor/actions/jsonExtractor.operation.js +369 -0
  46. package/dist/nodes/Crawl4aiContentExtractor/actions/jsonExtractor.operation.js.map +1 -0
  47. package/dist/nodes/Crawl4aiContentExtractor/actions/llmExtractor.operation.d.ts +4 -0
  48. package/dist/nodes/Crawl4aiContentExtractor/actions/llmExtractor.operation.js +786 -0
  49. package/dist/nodes/Crawl4aiContentExtractor/actions/llmExtractor.operation.js.map +1 -0
  50. package/dist/nodes/Crawl4aiContentExtractor/actions/operations.d.ts +8 -0
  51. package/dist/nodes/Crawl4aiContentExtractor/actions/operations.js +76 -0
  52. package/dist/nodes/Crawl4aiContentExtractor/actions/operations.js.map +1 -0
  53. package/dist/nodes/Crawl4aiContentExtractor/actions/regexExtractor.operation.d.ts +4 -0
  54. package/dist/nodes/Crawl4aiContentExtractor/actions/regexExtractor.operation.js +437 -0
  55. package/dist/nodes/Crawl4aiContentExtractor/actions/regexExtractor.operation.js.map +1 -0
  56. package/dist/nodes/Crawl4aiContentExtractor/actions/router.d.ts +2 -0
  57. package/dist/nodes/Crawl4aiContentExtractor/actions/router.js +37 -0
  58. package/dist/nodes/Crawl4aiContentExtractor/actions/router.js.map +1 -0
  59. package/dist/nodes/Crawl4aiContentExtractor/crawl4ai.svg +17 -0
  60. package/dist/nodes/Crawl4aiContentExtractor/helpers/apiClient.d.ts +1 -0
  61. package/dist/nodes/Crawl4aiContentExtractor/helpers/apiClient.js +7 -0
  62. package/dist/nodes/Crawl4aiContentExtractor/helpers/apiClient.js.map +1 -0
  63. package/dist/nodes/Crawl4aiContentExtractor/helpers/formatters.d.ts +1 -0
  64. package/dist/nodes/Crawl4aiContentExtractor/helpers/formatters.js +8 -0
  65. package/dist/nodes/Crawl4aiContentExtractor/helpers/formatters.js.map +1 -0
  66. package/dist/nodes/Crawl4aiContentExtractor/helpers/interfaces.d.ts +1 -0
  67. package/dist/nodes/Crawl4aiContentExtractor/helpers/interfaces.js +3 -0
  68. package/dist/nodes/Crawl4aiContentExtractor/helpers/interfaces.js.map +1 -0
  69. package/dist/nodes/Crawl4aiContentExtractor/helpers/utils.d.ts +6 -0
  70. package/dist/nodes/Crawl4aiContentExtractor/helpers/utils.js +89 -0
  71. package/dist/nodes/Crawl4aiContentExtractor/helpers/utils.js.map +1 -0
  72. package/dist/tsconfig.tsbuildinfo +1 -0
  73. package/index.js +14 -0
  74. package/package.json +70 -0
@@ -0,0 +1,299 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.description = void 0;
4
+ exports.execute = execute;
5
+ const n8n_workflow_1 = require("n8n-workflow");
6
+ const utils_1 = require("../helpers/utils");
7
+ const formatters_1 = require("../helpers/formatters");
8
+ exports.description = [
9
+ {
10
+ displayName: 'URLs',
11
+ name: 'urls',
12
+ type: 'string',
13
+ required: true,
14
+ default: '',
15
+ placeholder: 'https://example.com, https://example.org',
16
+ description: 'Comma-separated list of URLs to crawl',
17
+ displayOptions: {
18
+ show: {
19
+ operation: ['crawlMultipleUrls'],
20
+ },
21
+ },
22
+ },
23
+ {
24
+ displayName: 'Browser Options',
25
+ name: 'browserOptions',
26
+ type: 'collection',
27
+ placeholder: 'Add Option',
28
+ default: {},
29
+ displayOptions: {
30
+ show: {
31
+ operation: ['crawlMultipleUrls'],
32
+ },
33
+ },
34
+ options: [
35
+ {
36
+ displayName: 'Enable JavaScript',
37
+ name: 'javaScriptEnabled',
38
+ type: 'boolean',
39
+ default: true,
40
+ description: 'Whether to enable JavaScript execution',
41
+ },
42
+ {
43
+ displayName: 'Enable Stealth Mode',
44
+ name: 'enableStealth',
45
+ type: 'boolean',
46
+ default: false,
47
+ description: 'Whether to enable stealth mode to bypass basic bot detection (hides webdriver properties and modifies browser fingerprints)',
48
+ },
49
+ {
50
+ displayName: 'Headless Mode',
51
+ name: 'headless',
52
+ type: 'boolean',
53
+ default: true,
54
+ description: 'Whether to run browser in headless mode',
55
+ },
56
+ {
57
+ displayName: 'Timeout (Ms)',
58
+ name: 'timeout',
59
+ type: 'number',
60
+ default: 30000,
61
+ description: 'Maximum time to wait for the browser to load the page',
62
+ },
63
+ {
64
+ displayName: 'User Agent',
65
+ name: 'userAgent',
66
+ type: 'string',
67
+ default: '',
68
+ placeholder: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...',
69
+ description: 'The user agent to use (leave empty for default)',
70
+ },
71
+ {
72
+ displayName: 'Viewport Height',
73
+ name: 'viewportHeight',
74
+ type: 'number',
75
+ default: 800,
76
+ description: 'The height of the browser viewport',
77
+ },
78
+ {
79
+ displayName: 'Viewport Width',
80
+ name: 'viewportWidth',
81
+ type: 'number',
82
+ default: 1280,
83
+ description: 'The width of the browser viewport',
84
+ },
85
+ ],
86
+ },
87
+ {
88
+ displayName: 'Crawler Options',
89
+ name: 'crawlerOptions',
90
+ type: 'collection',
91
+ placeholder: 'Add Option',
92
+ default: {},
93
+ displayOptions: {
94
+ show: {
95
+ operation: ['crawlMultipleUrls'],
96
+ },
97
+ },
98
+ options: [
99
+ {
100
+ displayName: 'Cache Mode',
101
+ name: 'cacheMode',
102
+ type: 'options',
103
+ options: [
104
+ {
105
+ name: 'Bypass (Skip Cache)',
106
+ value: 'BYPASS',
107
+ description: 'Skip cache for this operation, fetch fresh content',
108
+ },
109
+ {
110
+ name: 'Disabled (No Cache)',
111
+ value: 'DISABLED',
112
+ description: 'No caching at all',
113
+ },
114
+ {
115
+ name: 'Enabled (Read/Write)',
116
+ value: 'ENABLED',
117
+ description: 'Use cache if available, save new results to cache',
118
+ },
119
+ {
120
+ name: 'Read Only',
121
+ value: 'READ_ONLY',
122
+ description: 'Only read from cache, do not write new results',
123
+ },
124
+ {
125
+ name: 'Write Only',
126
+ value: 'WRITE_ONLY',
127
+ description: 'Only write to cache, do not read existing cache',
128
+ },
129
+ ],
130
+ default: 'ENABLED',
131
+ description: 'How to use the cache when crawling',
132
+ },
133
+ {
134
+ displayName: 'Check Robots.txt',
135
+ name: 'checkRobotsTxt',
136
+ type: 'boolean',
137
+ default: false,
138
+ description: 'Whether to respect robots.txt rules',
139
+ },
140
+ {
141
+ displayName: 'CSS Selector',
142
+ name: 'cssSelector',
143
+ type: 'string',
144
+ default: '',
145
+ placeholder: 'article.content',
146
+ description: 'CSS selector to focus on specific content (leave empty for full page)',
147
+ },
148
+ {
149
+ displayName: 'Exclude External Links',
150
+ name: 'excludeExternalLinks',
151
+ type: 'boolean',
152
+ default: false,
153
+ description: 'Whether to exclude external links from the result',
154
+ },
155
+ {
156
+ displayName: 'Excluded Tags',
157
+ name: 'excludedTags',
158
+ type: 'string',
159
+ default: '',
160
+ placeholder: 'nav,footer,aside',
161
+ description: 'Comma-separated list of HTML tags to exclude from processing',
162
+ },
163
+ {
164
+ displayName: 'Max Retries',
165
+ name: 'maxRetries',
166
+ type: 'number',
167
+ default: 3,
168
+ description: 'Maximum number of retries for failed requests',
169
+ },
170
+ {
171
+ displayName: 'Page Timeout (Ms)',
172
+ name: 'pageTimeout',
173
+ type: 'number',
174
+ default: 30000,
175
+ description: 'Maximum time to wait for the page to load',
176
+ },
177
+ {
178
+ displayName: 'Request Timeout (Ms)',
179
+ name: 'requestTimeout',
180
+ type: 'number',
181
+ default: 30000,
182
+ description: 'Maximum time to wait for network requests',
183
+ },
184
+ {
185
+ displayName: 'Stream Results',
186
+ name: 'streamEnabled',
187
+ type: 'boolean',
188
+ default: false,
189
+ description: 'Whether to stream results as they become available',
190
+ },
191
+ {
192
+ displayName: 'Wait For',
193
+ name: 'waitFor',
194
+ type: 'string',
195
+ default: '',
196
+ placeholder: '.loading-complete',
197
+ description: 'CSS selector or JavaScript expression to wait for before extracting content (essential for dynamic/SPA pages)',
198
+ },
199
+ {
200
+ displayName: 'Word Count Threshold',
201
+ name: 'wordCountThreshold',
202
+ type: 'number',
203
+ default: 0,
204
+ description: 'Minimum number of words for content to be included',
205
+ },
206
+ ],
207
+ },
208
+ {
209
+ displayName: 'Options',
210
+ name: 'options',
211
+ type: 'collection',
212
+ placeholder: 'Add Option',
213
+ default: {},
214
+ displayOptions: {
215
+ show: {
216
+ operation: ['crawlMultipleUrls'],
217
+ },
218
+ },
219
+ options: [
220
+ {
221
+ displayName: 'Include Media Data',
222
+ name: 'includeMedia',
223
+ type: 'boolean',
224
+ default: false,
225
+ description: 'Whether to include media data in output (images, videos)',
226
+ },
227
+ {
228
+ displayName: 'Verbose Response',
229
+ name: 'verboseResponse',
230
+ type: 'boolean',
231
+ default: false,
232
+ description: 'Whether to include detailed data in output (HTML, status codes, etc.)',
233
+ },
234
+ {
235
+ displayName: 'Max Concurrent Crawls',
236
+ name: 'maxConcurrent',
237
+ type: 'number',
238
+ default: 5,
239
+ description: 'Maximum number of concurrent crawls',
240
+ },
241
+ ],
242
+ },
243
+ ];
244
+ async function execute(items, nodeOptions) {
245
+ var _a;
246
+ const allResults = [];
247
+ for (let i = 0; i < items.length; i++) {
248
+ try {
249
+ const urlsString = this.getNodeParameter('urls', i, '');
250
+ const browserOptions = this.getNodeParameter('browserOptions', i, {});
251
+ const crawlerOptions = this.getNodeParameter('crawlerOptions', i, {});
252
+ const options = this.getNodeParameter('options', i, {});
253
+ if (!urlsString) {
254
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'URLs cannot be empty.', { itemIndex: i });
255
+ }
256
+ const urls = urlsString
257
+ .split(',')
258
+ .map(url => url.trim())
259
+ .filter(url => url);
260
+ if (urls.length === 0) {
261
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'No valid URLs provided.', { itemIndex: i });
262
+ }
263
+ const invalidUrls = urls.filter(url => !(0, utils_1.isValidUrl)(url));
264
+ if (invalidUrls.length > 0) {
265
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Invalid URLs: ${invalidUrls.join(', ')}`, { itemIndex: i });
266
+ }
267
+ const browserConfig = (0, utils_1.createBrowserConfig)(browserOptions);
268
+ const crawlerConfig = (0, utils_1.createCrawlerRunConfig)({
269
+ ...crawlerOptions,
270
+ ...browserConfig,
271
+ maxConcurrent: options.maxConcurrent ? Number(options.maxConcurrent) : 5,
272
+ });
273
+ const crawler = await (0, utils_1.getCrawl4aiClient)(this);
274
+ const results = await crawler.crawlMultipleUrls(urls, crawlerConfig);
275
+ for (const result of results) {
276
+ const formattedResult = (0, formatters_1.formatCrawlResult)(result, options.includeMedia, options.verboseResponse);
277
+ allResults.push({
278
+ json: formattedResult,
279
+ pairedItem: { item: i },
280
+ });
281
+ }
282
+ }
283
+ catch (error) {
284
+ if (this.continueOnFail()) {
285
+ const node = this.getNode();
286
+ const errorItemIndex = (_a = error.itemIndex) !== null && _a !== void 0 ? _a : i;
287
+ allResults.push({
288
+ json: items[i].json,
289
+ error: new n8n_workflow_1.NodeOperationError(node, error.message, { itemIndex: errorItemIndex }),
290
+ pairedItem: { item: i },
291
+ });
292
+ continue;
293
+ }
294
+ throw error;
295
+ }
296
+ }
297
+ return allResults;
298
+ }
299
+ //# sourceMappingURL=crawlMultipleUrls.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crawlMultipleUrls.operation.js","sourceRoot":"","sources":["../../../../nodes/Crawl4aiBasicCrawler/actions/crawlMultipleUrls.operation.ts"],"names":[],"mappings":";;;AAiQA,0BAuFC;AAlVD,+CAAkD;AAIlD,4CAK0B;AAC1B,sDAA0D;AAG7C,QAAA,WAAW,GAAsB;IAC5C;QACE,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,0CAA0C;QACvD,WAAW,EAAE,uCAAuC;QACpD,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,SAAS,EAAE,CAAC,mBAAmB,CAAC;aACjC;SACF;KACF;IACD;QACE,WAAW,EAAE,iBAAiB;QAC9B,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,YAAY;QACzB,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,SAA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B,OAAO,CAAC,eAA0B,CACnC,CAAC;gBAGF,UAAU,CAAC,IAAI,CAAC;oBACd,IAAI,EAAE,eAAe;oBACrB,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;iBACxB,CAAC,CAAC;YACL,CAAC;QAEH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAEf,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;gBAC1B,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;gBAC5B,MAAM,cAAc,GAAG,MAAC,KAAa,CAAC,SAAS,mCAAI,CAAC,CAAC;gBACrD,UAAU,CAAC,IAAI,CAAC;oBACd,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI;oBACnB,KAAK,EAAE,IAAI,iCAAkB,CAAC,IAAI,EAAG,KAAe,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;oBAC5F,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;iBACxB,CAAC,CAAC;gBACH,SAAS;YACX,CAAC;YAED,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
2
+ import type { Crawl4aiNodeOptions } from '../helpers/interfaces';
3
+ export declare const description: INodeProperties[];
4
+ export declare function execute(this: IExecuteFunctions, items: INodeExecutionData[], nodeOptions: Crawl4aiNodeOptions): Promise<INodeExecutionData[]>;
@@ -0,0 +1,324 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.description = void 0;
4
+ exports.execute = execute;
5
+ const n8n_workflow_1 = require("n8n-workflow");
6
+ const utils_1 = require("../helpers/utils");
7
+ const formatters_1 = require("../helpers/formatters");
8
+ exports.description = [
9
+ {
10
+ displayName: 'URL',
11
+ name: 'url',
12
+ type: 'string',
13
+ required: true,
14
+ default: '',
15
+ placeholder: 'https://example.com',
16
+ description: 'The URL to crawl',
17
+ displayOptions: {
18
+ show: {
19
+ operation: ['crawlSingleUrl'],
20
+ },
21
+ },
22
+ },
23
+ {
24
+ displayName: 'Browser Options',
25
+ name: 'browserOptions',
26
+ type: 'collection',
27
+ placeholder: 'Add Option',
28
+ default: {},
29
+ displayOptions: {
30
+ show: {
31
+ operation: ['crawlSingleUrl'],
32
+ },
33
+ },
34
+ options: [
35
+ {
36
+ displayName: 'Browser Type',
37
+ name: 'browserType',
38
+ type: 'options',
39
+ options: [
40
+ {
41
+ name: 'Chromium',
42
+ value: 'chromium',
43
+ description: 'Use Chromium browser (default, most compatible)',
44
+ },
45
+ {
46
+ name: 'Firefox',
47
+ value: 'firefox',
48
+ description: 'Use Firefox browser',
49
+ },
50
+ {
51
+ name: 'Webkit',
52
+ value: 'webkit',
53
+ description: 'Use Webkit browser (Safari engine)',
54
+ },
55
+ ],
56
+ default: 'chromium',
57
+ description: 'Which browser engine to use for crawling',
58
+ },
59
+ {
60
+ displayName: 'Enable JavaScript',
61
+ name: 'javaScriptEnabled',
62
+ type: 'boolean',
63
+ default: true,
64
+ description: 'Whether to enable JavaScript execution',
65
+ },
66
+ {
67
+ displayName: 'Enable Stealth Mode',
68
+ name: 'enableStealth',
69
+ type: 'boolean',
70
+ default: false,
71
+ description: 'Whether to enable stealth mode to bypass basic bot detection (hides webdriver properties and modifies browser fingerprints)',
72
+ },
73
+ {
74
+ displayName: 'Headless Mode',
75
+ name: 'headless',
76
+ type: 'boolean',
77
+ default: true,
78
+ description: 'Whether to run browser in headless mode',
79
+ },
80
+ {
81
+ displayName: 'Timeout (Ms)',
82
+ name: 'timeout',
83
+ type: 'number',
84
+ default: 30000,
85
+ description: 'Maximum time to wait for the browser to load the page',
86
+ },
87
+ {
88
+ displayName: 'User Agent',
89
+ name: 'userAgent',
90
+ type: 'string',
91
+ default: '',
92
+ placeholder: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...',
93
+ description: 'The user agent to use (leave empty for default)',
94
+ },
95
+ {
96
+ displayName: 'Viewport Height',
97
+ name: 'viewportHeight',
98
+ type: 'number',
99
+ default: 800,
100
+ description: 'The height of the browser viewport',
101
+ },
102
+ {
103
+ displayName: 'Viewport Width',
104
+ name: 'viewportWidth',
105
+ type: 'number',
106
+ default: 1280,
107
+ description: 'The width of the browser viewport',
108
+ },
109
+ ],
110
+ },
111
+ {
112
+ displayName: 'Crawler Options',
113
+ name: 'crawlerOptions',
114
+ type: 'collection',
115
+ placeholder: 'Add Option',
116
+ default: {},
117
+ displayOptions: {
118
+ show: {
119
+ operation: ['crawlSingleUrl'],
120
+ },
121
+ },
122
+ options: [
123
+ {
124
+ displayName: 'Cache Mode',
125
+ name: 'cacheMode',
126
+ type: 'options',
127
+ options: [
128
+ {
129
+ name: 'Bypass (Skip Cache)',
130
+ value: 'BYPASS',
131
+ description: 'Skip cache for this operation, fetch fresh content',
132
+ },
133
+ {
134
+ name: 'Disabled (No Cache)',
135
+ value: 'DISABLED',
136
+ description: 'No caching at all',
137
+ },
138
+ {
139
+ name: 'Enabled (Read/Write)',
140
+ value: 'ENABLED',
141
+ description: 'Use cache if available, save new results to cache',
142
+ },
143
+ {
144
+ name: 'Read Only',
145
+ value: 'READ_ONLY',
146
+ description: 'Only read from cache, do not write new results',
147
+ },
148
+ {
149
+ name: 'Write Only',
150
+ value: 'WRITE_ONLY',
151
+ description: 'Only write to cache, do not read existing cache',
152
+ },
153
+ ],
154
+ default: 'ENABLED',
155
+ description: 'How to use the cache when crawling',
156
+ },
157
+ {
158
+ displayName: 'Check Robots.txt',
159
+ name: 'checkRobotsTxt',
160
+ type: 'boolean',
161
+ default: false,
162
+ description: 'Whether to respect robots.txt rules',
163
+ },
164
+ {
165
+ displayName: 'CSS Selector',
166
+ name: 'cssSelector',
167
+ type: 'string',
168
+ default: '',
169
+ placeholder: 'article.content',
170
+ description: 'CSS selector to focus on specific content (leave empty for full page)',
171
+ },
172
+ {
173
+ displayName: 'Exclude External Links',
174
+ name: 'excludeExternalLinks',
175
+ type: 'boolean',
176
+ default: false,
177
+ description: 'Whether to exclude external links from the result',
178
+ },
179
+ {
180
+ displayName: 'Excluded Tags',
181
+ name: 'excludedTags',
182
+ type: 'string',
183
+ default: '',
184
+ placeholder: 'nav,footer,aside',
185
+ description: 'Comma-separated list of HTML tags to exclude from processing',
186
+ },
187
+ {
188
+ displayName: 'JavaScript Code',
189
+ name: 'jsCode',
190
+ type: 'string',
191
+ typeOptions: {
192
+ rows: 4,
193
+ },
194
+ default: '',
195
+ placeholder: 'document.querySelector("button.load-more").click();',
196
+ description: 'JavaScript code to execute on the page after load',
197
+ },
198
+ {
199
+ displayName: 'JavaScript Only Mode',
200
+ name: 'jsOnly',
201
+ type: 'boolean',
202
+ default: false,
203
+ description: 'Whether to only execute JavaScript without crawling',
204
+ },
205
+ {
206
+ displayName: 'Max Retries',
207
+ name: 'maxRetries',
208
+ type: 'number',
209
+ default: 3,
210
+ description: 'Maximum number of retries for failed requests',
211
+ },
212
+ {
213
+ displayName: 'Page Timeout (Ms)',
214
+ name: 'pageTimeout',
215
+ type: 'number',
216
+ default: 30000,
217
+ description: 'Maximum time to wait for the page to load',
218
+ },
219
+ {
220
+ displayName: 'Request Timeout (Ms)',
221
+ name: 'requestTimeout',
222
+ type: 'number',
223
+ default: 30000,
224
+ description: 'Maximum time to wait for network requests',
225
+ },
226
+ {
227
+ displayName: 'Session ID',
228
+ name: 'sessionId',
229
+ type: 'string',
230
+ default: '',
231
+ placeholder: 'my-session-ID',
232
+ description: 'ID to maintain browser state across multiple crawls (for multi-step crawling)',
233
+ },
234
+ {
235
+ displayName: 'Wait For',
236
+ name: 'waitFor',
237
+ type: 'string',
238
+ default: '',
239
+ placeholder: '.loading-complete',
240
+ description: 'CSS selector or JavaScript expression to wait for before extracting content (essential for dynamic/SPA pages)',
241
+ },
242
+ {
243
+ displayName: 'Word Count Threshold',
244
+ name: 'wordCountThreshold',
245
+ type: 'number',
246
+ default: 0,
247
+ description: 'Minimum number of words for content to be included',
248
+ },
249
+ ],
250
+ },
251
+ {
252
+ displayName: 'Options',
253
+ name: 'options',
254
+ type: 'collection',
255
+ placeholder: 'Add Option',
256
+ default: {},
257
+ displayOptions: {
258
+ show: {
259
+ operation: ['crawlSingleUrl'],
260
+ },
261
+ },
262
+ options: [
263
+ {
264
+ displayName: 'Include Media Data',
265
+ name: 'includeMedia',
266
+ type: 'boolean',
267
+ default: false,
268
+ description: 'Whether to include media data in output (images, videos)',
269
+ },
270
+ {
271
+ displayName: 'Verbose Response',
272
+ name: 'verboseResponse',
273
+ type: 'boolean',
274
+ default: false,
275
+ description: 'Whether to include detailed data in output (HTML, status codes, etc.)',
276
+ },
277
+ ],
278
+ },
279
+ ];
280
+ async function execute(items, nodeOptions) {
281
+ var _a;
282
+ const allResults = [];
283
+ for (let i = 0; i < items.length; i++) {
284
+ try {
285
+ const url = this.getNodeParameter('url', i, '');
286
+ const browserOptions = this.getNodeParameter('browserOptions', i, {});
287
+ const crawlerOptions = this.getNodeParameter('crawlerOptions', i, {});
288
+ const options = this.getNodeParameter('options', i, {});
289
+ if (!url) {
290
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'URL cannot be empty.', { itemIndex: i });
291
+ }
292
+ if (!(0, utils_1.isValidUrl)(url)) {
293
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Invalid URL: ${url}`, { itemIndex: i });
294
+ }
295
+ const browserConfig = (0, utils_1.createBrowserConfig)(browserOptions);
296
+ const crawlerConfig = (0, utils_1.createCrawlerRunConfig)({
297
+ ...crawlerOptions,
298
+ ...browserConfig,
299
+ });
300
+ const crawler = await (0, utils_1.getCrawl4aiClient)(this);
301
+ const result = await crawler.crawlUrl(url, crawlerConfig);
302
+ const formattedResult = (0, formatters_1.formatCrawlResult)(result, options.includeMedia, options.verboseResponse);
303
+ allResults.push({
304
+ json: formattedResult,
305
+ pairedItem: { item: i },
306
+ });
307
+ }
308
+ catch (error) {
309
+ if (this.continueOnFail()) {
310
+ const node = this.getNode();
311
+ const errorItemIndex = (_a = error.itemIndex) !== null && _a !== void 0 ? _a : i;
312
+ allResults.push({
313
+ json: items[i].json,
314
+ error: new n8n_workflow_1.NodeOperationError(node, error.message, { itemIndex: errorItemIndex }),
315
+ pairedItem: { item: i },
316
+ });
317
+ continue;
318
+ }
319
+ throw error;
320
+ }
321
+ }
322
+ return allResults;
323
+ }
324
+ //# sourceMappingURL=crawlSingleUrl.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crawlSingleUrl.operation.js","sourceRoot":"","sources":["../../../../nodes/Crawl4aiBasicCrawler/actions/crawlSingleUrl.operation.ts"],"names":[],"mappings":";;;AAqSA,0BAmEC;AAlWD,+CAAkD;AAIlD,4CAK0B;AAC1B,sDAA0D;AAG7C,QAAA,WAAW,GAAsB;IAC5C;QACE,WAAW,EAAE,KAAK;QAClB,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,qBAAqB;QAClC,WAAW,EAAE,kBAAkB;QAC/B,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,SAAS,EAAE,CAAC,gBAAgB,CAAC;aAC9B;SACF;KACF;IACD;QACE,WAAW,EAAE,iBAAiB;QAC9B,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,YAAY;QACzB,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,SAAS,EAAE,CAAC,gBAAgB,CAAC;aAC9B;SACF;QACD,OAAO,EAAE;YACP;gBACE,WAAW,EAAE,cAAc;gBAC3B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,UAAU;wBAChB,KAAK,EAAE,UAAU;wBACjB,WAAW,EAAE,iDAAiD;qBAC/D;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G,IAAI,CAAC,OAAO,EAAE,CAAC;gBAC5B,MAAM,cAAc,GAAG,MAAC,KAAa,CAAC,SAAS,mCAAI,CAAC,CAAC;gBACrD,UAAU,CAAC,IAAI,CAAC;oBACd,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI;oBACnB,KAAK,EAAE,IAAI,iCAAkB,CAAC,IAAI,EAAG,KAAe,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;oBAC5F,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;iBACxB,CAAC,CAAC;gBACH,SAAS;YACX,CAAC;YAED,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { INodeProperties, IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ import type { Crawl4aiNodeOptions } from '../helpers/interfaces';
3
+ type OperationExecuteFunction = (this: IExecuteFunctions, items: INodeExecutionData[], nodeOptions: Crawl4aiNodeOptions) => Promise<INodeExecutionData[]>;
4
+ export declare const operations: {
5
+ [key: string]: OperationExecuteFunction;
6
+ };
7
+ export declare const description: INodeProperties[];
8
+ export {};