Files
SpiderBrand/Website Craw CSS.json
T
2026-05-09 17:46:38 +00:00

360 lines
9.8 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"name": "Website Craw CSS",
"nodes": [
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
496,
0
],
"id": "276425c9-312d-41db-8abe-0d126c5e63bc",
"name": "When clicking Execute workflow"
},
{
"parameters": {
"amount": 15
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
880,
0
],
"id": "201b3b1b-cebe-4c9e-abc6-ddf6bf289704",
"name": "Wait",
"webhookId": "bd46a11c-b55b-4967-878b-9e77cf7ae8ac"
},
{
"parameters": {
"mode": "raw",
"jsonOutput": "={\n\"products\": {{\n$('Get LLM Crawl').last().json.results.flatMap(item => {\nconst parsed = JSON.parse(item.extracted_content);\nreturn parsed.map(({ rating, ...rest }) => ({\n...rest,\nstar_count: Array.isArray(rating) ? rating.length : 0\n}));\n})\n}}\n}\n\n",
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1632,
-16
],
"id": "0c9c0b61-4f26-498a-af48-39d311009a36",
"name": "LLM Result"
},
{
"parameters": {
"url": "=https://pruebadetemplate-crwal4ai.k11ytw.easypanel.host/task/{{ $json.task_id }}",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1056,
0
],
"id": "a78332b7-7b8c-4d88-ab86-c20a07557e43",
"name": "Get LLM Crawl",
"credentials": {
"httpBasicAuth": {
"id": "kSyyvvNaOBuA00C4",
"name": "crawl4aiserver"
},
"httpHeaderAuth": {
"id": "VLM9roYC9zcTGJsa",
"name": "panel"
}
}
},
{
"parameters": {
"mode": "raw",
"jsonOutput": "={\n \"task_id\": \"{{ $('Markdown Crawl Request').item.json.task_id }}\", \"status\": \"{{ $json.status }}\"\n}",
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1264,
0
],
"id": "0e2549d5-b06c-4bd8-93ca-6f7e81f81d53",
"name": "LLM TID Field"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "aad7f793-d74c-4f00-8d29-11b4782b43c8",
"leftValue": "={{ $json.status }}",
"rightValue": "pending",
"operator": {
"type": "string",
"operation": "notEquals"
}
},
{
"id": "c1ca239e-8ba0-447f-bc6e-bdbc83273c9f",
"leftValue": "={{ $json.status }}",
"rightValue": "processing",
"operator": {
"type": "string",
"operation": "notEquals"
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
1472,
0
],
"id": "e83c31da-0d64-4fb0-b9ab-8b7ebd941ce5",
"name": "LLM if In Process"
},
{
"parameters": {
"method": "POST",
"url": "https://pruebadetemplate-crwal4ai.k11ytw.easypanel.host/crawl",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"urls\": {{ JSON.stringify(Array.from({ length: 2 }, (_, i) =>\n'https://sandbox.oxylabs.io/products?page=${i + 1}')) }},\n \"crawler_params\": {\n \"headless\": true\n },\n \"extraction_config\": {\n \"type\": \"json_css\",\n \"params\": {\n \"schema\": {\n \"name\": \"Oxylabs Products\",\n \"baseSelector\": \"div.product-card\",\n \"fields\": [\n {\n \"name\": \"product_link\",\n \"selector\": \".card-header\",\n \"type\": \"attribute\",\n \"attribute\": \"href\"\n },\n {\n \"name\": \"title\",\n \"selector\": \".title\",\n \"type\": \"text\"\n },\n {\n \"name\": \"rating\",\n \"type\": \"list\",\n \"selector\": \".rating svg\",\n \"fields\": [\n {\n \"name\": \"star_svg\",\n \"type\": \"html\"\n }\n ]\n },\n {\n \"name\": \"description\",\n \"selector\": \".description\",\n \"type\": \"text\"\n },\n {\n \"name\": \"price\",\n \"selector\": \".price-wrapper\",\n \"type\": \"text\"\n },\n {\n \"name\": \"stock_status\",\n \"selector\": \".in-stock\",\n \"type\": \"text\"\n }\n ]\n }\n }\n },\n \"verbose\": true,\n \"cache_mode\": \"bypass\",\n \"semaphore_count\": 2\n}\n",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
672,
0
],
"id": "05fbc6b5-989e-4cfa-bc6b-f12d1c43255e",
"name": "Markdown Crawl Request",
"credentials": {
"httpBasicAuth": {
"id": "kSyyvvNaOBuA00C4",
"name": "crawl4aiserver"
},
"httpHeaderAuth": {
"id": "VLM9roYC9zcTGJsa",
"name": "panel"
}
}
},
{
"parameters": {
"documentId": {
"__rl": true,
"value": "1LatvxzjsFgWUcDgqIFubGbsy6yNeeSwZ7w9yg_tb8xY",
"mode": "list",
"cachedResultName": "UrlsTest",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LatvxzjsFgWUcDgqIFubGbsy6yNeeSwZ7w9yg_tb8xY/edit?usp=drivesdk"
},
"sheetName": {
"__rl": true,
"value": "gid=0",
"mode": "list",
"cachedResultName": "Hoja 1",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LatvxzjsFgWUcDgqIFubGbsy6yNeeSwZ7w9yg_tb8xY/edit#gid=0"
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [
1072,
272
],
"id": "74ee3af8-6237-43c7-909c-1c72f52a5a0c",
"name": "Get row(s) in sheet",
"credentials": {
"googleSheetsOAuth2Api": {
"id": "SE121yXzuB6zr94l",
"name": "Google Sheets account"
}
},
"disabled": true
},
{
"parameters": {
"options": {}
},
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [
1280,
272
],
"id": "e5199e00-0338-4f3d-88c6-8ec96835975f",
"name": "Loop Over Items",
"disabled": true
},
{
"parameters": {
"fieldToSplitOut": "products",
"options": {}
},
"type": "n8n-nodes-base.splitOut",
"typeVersion": 1,
"position": [
1808,
-16
],
"id": "748d3237-e40b-4f4c-800a-625c24ab6cd2",
"name": "Split Out"
},
{
"parameters": {
"binaryPropertyName": "products",
"options": {}
},
"type": "n8n-nodes-base.convertToFile",
"typeVersion": 1.1,
"position": [
1968,
-16
],
"id": "99c19185-50e6-4b49-9f7e-15c434c03f14",
"name": "Convert to File"
}
],
"pinData": {},
"connections": {
"When clicking Execute workflow": {
"main": [
[
{
"node": "Markdown Crawl Request",
"type": "main",
"index": 0
}
]
]
},
"Wait": {
"main": [
[
{
"node": "Get LLM Crawl",
"type": "main",
"index": 0
}
]
]
},
"Get LLM Crawl": {
"main": [
[
{
"node": "LLM TID Field",
"type": "main",
"index": 0
}
]
]
},
"LLM TID Field": {
"main": [
[
{
"node": "LLM if In Process",
"type": "main",
"index": 0
}
]
]
},
"LLM if In Process": {
"main": [
[
{
"node": "LLM Result",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Markdown Crawl Request": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Get row(s) in sheet": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[],
[]
]
},
"LLM Result": {
"main": [
[
{
"node": "Split Out",
"type": "main",
"index": 0
}
]
]
},
"Split Out": {
"main": [
[
{
"node": "Convert to File",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "fcdd8ae2-6c72-4cf6-a3b9-d87b93e0d0d2",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "57b253ac4a90f3c1149cb4540b0ccf8677c4c106dc133e4a240f1f14ec79a39c"
},
"id": "1qFQ6FmyYMqrrV8n",
"tags": []
}