8
n8n 中文网amn8n.com

网页内部链接提取

中级

这是一个Engineering, Marketing领域的自动化工作流,包含 13 个节点。主要使用 If, Set, Html, Merge, Filter 等节点。 从网页中提取内部链接

前置要求
  • 可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "568298fde06d3db80a2eea77fe5bf45f0c7bb898dea20b769944e9ac7c6c5a80"
  },
  "nodes": [
    {
      "id": "818f7262-e70c-4297-83c5-41e894bf8a10",
      "name": "当点击\"测试工作流\"时",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -980,
        -120
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "5cc7d8a9-c253-45ad-a8eb-3c977ad23f84",
      "name": "拆分输出",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -300,
        -120
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "238edb88-1016-4924-ab1f-aa74a843a4d9",
      "name": "合并",
      "type": "n8n-nodes-base.merge",
      "position": [
        280,
        -120
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "2950100e-0307-40b8-892a-c92a3056e445",
      "name": "设置基础 URL",
      "type": "n8n-nodes-base.set",
      "position": [
        -800,
        -120
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "b045bf61-6dfe-48a1-875d-214d3676b80e",
      "name": "获取基础 URL",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -640,
        -120
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "0d2351f2-7448-4de6-8b56-31827dcdfa95",
      "name": "提取链接",
      "type": "n8n-nodes-base.html",
      "position": [
        -460,
        -120
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "8f5dabe6-bb43-4371-bfa4-19de3d057e78",
      "name": "查找相对链接",
      "type": "n8n-nodes-base.if",
      "position": [
        -120,
        -120
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "5ca484fb-1c45-4103-a7d8-daf23d2d3bd3",
      "name": "附加基础 URL",
      "type": "n8n-nodes-base.set",
      "position": [
        80,
        -220
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "29b4e98f-24e9-4d7d-9b74-5e11884c25f6",
      "name": "过滤外部链接",
      "type": "n8n-nodes-base.filter",
      "position": [
        460,
        -120
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "4d3984cd-510b-452a-84ba-2a92ce3dd749",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -820,
        -240
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "5c85b507-7a4f-4c48-bc14-4d546ddf52e1",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -660,
        -240
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "178e9eed-70bf-481a-a70c-d4238f686957",
      "name": "便签 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        -240
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "94d0346e-1e4f-4473-a27f-838210dbda11",
      "name": "便签 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1260,
        -240
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Filter external links",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Find relative links",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Base URL": {
      "main": [
        [
          {
            "node": "Fetch base URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract links": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch base URL": {
      "main": [
        [
          {
            "node": "Extract links",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append base URL": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find relative links": {
      "main": [
        [
          {
            "node": "Append base URL",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Set Base URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

中级 - 工程, 营销

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
中级
节点数量13
分类2
节点类型9
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者
Audun

Audun

@xqus

Transforming complexity into simplicity.

外部链接
在 n8n.io 查看

分享此工作流