
Rajinder Singh
Deep Learning Researcher

GeeTest V4 是极验行为验证码系统的最新一代,越来越多的网站使用它来保护登录表单、注册页面和数据接口。与依赖图像谜题的旧版验证码系统不同,GeeTest V4 采用自适应挑战和行为分析——这使其成为您在自动化工作流中遇到的更复杂的保护之一。
如果您可以在 n8n 工作流中自动解决 GeeTest V4,无论是构建可重用的解决方案 API、抓取受验证码保护的网站,还是自动化登录表单——所有这些都无需编写一行传统代码,那会怎么样?
在本指南中,您将学习如何将 n8n(一个可视化工作流自动化工具)与 CapSolver(一个由 AI 驱动的验证码解决方案服务)结合起来,按需解决 GeeTest V4 挑战——既可以作为独立的 API 端点,也可以作为任何自动化工作流中的一个步骤。
您将构建什么:
解决方案 API — 其他工具可以调用的可重用端点:
直接使用工作流 — CapSolver 作为更大自动化中的一个步骤:
GeeTest V4 是极验验证码平台的最新版本。它用简化的集成模型和增强的行为检测取代了旧的 V3 系统。从解决的角度来看,V4 在结构上比 V3 更简单——它只需要一个静态参数(captchaId),而不是 V3 所需的动态挑战流程。

与 GeeTest V3 的主要区别:
| 功能 | GeeTest V3 | GeeTest V4 |
|---|---|---|
| 主要参数 | gt + 动态 challenge |
captchaId (静态) |
| 挑战获取 | 需要 — 必须先调用 GeeTest API | 不需要 — captchaId 是静态的 |
| 解决方案字段 | 3 (challenge, validate, seccode) |
5 (captcha_id, lot_number, pass_token, gen_time, captcha_output) |
| 小部件脚本 | gt.js |
gcaptcha4.js |
| 任务类型 | GeeTestTask / GeeTestTaskProxyLess |
仅 GeeTestTaskProxyLess |
V4 的主要优势:
captchaId嵌入在页面源代码中,永不改变——找到一次,永久使用。无需动态获取挑战意味着工作流中的节点更少。
在开始之前,请确保您具备以下条件:
重要提示: 确保您的 CapSolver 账户中有足够的余额。GeeTest V4 解决方案任务会根据使用情况消耗积分。
CapSolver 作为 n8n 中的官方集成提供——无需安装任何社区节点。您可以在构建工作流时直接在节点面板中找到它。
由于它是官方集成,您需要在 n8n 中创建凭据,以便 CapSolver 节点可以使用您的账户进行身份验证。
导航到您的 n8n 实例并转到 Settings -> Credentials。您将在此处看到所有已配置的凭据。

All(默认)n8n 将自动测试连接。您应该会看到一个绿色的 "Connection tested successfully" 横幅,确认您的 API 密钥有效。

重要提示: 您工作流中的每个 CapSolver 节点都将引用此凭据。您只需创建一次——所有解决方案工作流都将共享相同的凭据。
现在您已准备好构建 GeeTest V4 解决方案工作流!
在解决 GeeTest V4 验证码之前,您需要找到其 captchaId——唯一必需的参数。与 GeeTest V3(需要获取动态 challenge)不同,V4 的 captchaId 是静态的,并直接嵌入在页面源代码中。
captcha_id 或 captchaIdgcaptcha4.js 的引用——GeeTest V4 小部件脚本captchaId 通常在初始化小部件时作为配置参数传递<!-- 示例:页面源代码中的 GeeTest V4 初始化 -->
<script>
initGeetest4({
captchaId: 'e392e1d7fd421dc63325744d5a2b9c73',
product: 'bind'
});
</script>
gcaptcha4 或 geetest 过滤请求gcaptcha4.geetest.com 的请求——captcha_id 参数将在查询字符串中V4 的主要优势:
captchaId是静态的——一旦找到,您就可以无限期地使用它,而无需每次都获取新的挑战。这使得 V4 工作流在结构上与 Turnstile 工作流相同。
此工作流创建一个 POST API 端点,该端点接受 GeeTest V4 参数并返回一组已解决的令牌。

该工作流由四个节点组成:
$json.error 不为空)进行分支{"error": "..."}| 设置 | 值 |
|---|---|
| HTTP 方法 | POST |
| 路径 | solver-geetest-v4 |
| 响应 | Response Node |
这将在以下位置创建端点:https://your-n8n-instance.com/webhook/solver-geetest-v4
| 参数 | 值 | 描述 |
|---|---|---|
| 操作 | GeeTest V4 |
必须设置为 GeeTest V4 |
| 类型 | GeeTestTaskProxyLess |
这是唯一可用的任务类型(无代理变体) |
| 网站 URL | {{ $json.body.websiteURL }} |
包含 GeeTest V4 小部件的页面 URL |
| 验证码 ID | {{ $json.body.captchaId }} |
静态 GeeTest V4 验证码 ID |
| GeeTest API 服务器子域 | (可选) | 如果网站使用自定义 GeeTest API 服务器 |
在此节点中选择您的 CapSolver 凭据。可选的
geetestApiServerSubdomain参数很少需要——仅当默认的 GeeTest 服务器不适用于您的目标网站时才添加它。
| 设置 | 值 |
|---|---|
| 条件 | ={{ $json.error }} 不为空 |
| 真分支 | 路由到错误响应 Webhook 节点 |
| 假分支 | 路由到成功响应 Webhook 节点 |
成功分支 (CapSolver 错误?的假输出):
| 设置 | 值 |
|---|---|
| 响应方式 | JSON |
| 响应正文 | ={{ JSON.stringify($json.data) }} |
向您的 Webhook 端点发送 POST 请求:
curl -X POST https://your-n8n-instance.com/webhook/solver-geetest-v4 \
-H "Content-Type: application/json" \
-d '{
"websiteURL": "https://example.com/login",
"captchaId": "e392e1d7fd421dc63325744d5a2b9c73"
}'
预期响应:
{
"taskId": "abc123...",
"solution": {
"captcha_id": "e392e1d7fd421dc63325744d5a2b9c73",
"lot_number": "7c18c041a6ed4e...",
"pass_token": "d88ce40c0a5c5a18...",
"gen_time": "1709123456",
"captcha_output": "dGVzdF9jYXB0Y2hh..."
},
"status": "ready"
}
复制下面的 JSON 并通过 Menu > Import from JSON 将其导入 n8n:
{
"name": "GeeTest V4 — Solver API",
"nodes": [
{
"parameters": {
"content": "## GeeTest V4 — Solver API\n\n**适用对象:** 需要通过简单 POST 端点解决 GeeTest V4 挑战的开发人员。\n\n**功能:** 公开一个 Webhook,该 Webhook 接受验证码参数,使用 CapSolver 解决挑战,并以 JSON 格式返回令牌或错误。\n\n**工作原理:**\n1. Webhook 接收包含目标 URL、站点密钥和可选参数的 POST 请求\n2. CapSolver 节点解决 GeeTest V4 挑战\n3. IF 节点检查错误 → 返回成功令牌或错误 JSON\n\n**设置:**\n1. 在 **Settings → Credentials → CapSolver API** 下添加您的 CapSolver API 密钥\n2. 激活工作流\n3. 使用您的验证码参数 POST 到 Webhook URL",
"height": 494,
"width": 460,
"color": 1
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-712,
-400
],
"id": "sticky-blog-main-1773678228112-1",
"name": "Sticky Note"
},
{
"parameters": {
"httpMethod": "POST",
"path": "solver-geetest-v4",
"responseMode": "responseNode",
"options": {}
},
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
-192,
0
],
"id": "a1b2c3d4-0001-0001-0001-a1b2c3d40001",
"name": "Webhook Trigger",
"webhookId": "a1b2c3d4-aaaa-bbbb-cccc-a1b2c3d40001",
"onError": "continueRegularOutput"
},
{
"parameters": {
"operation": "GeeTest V4",
"websiteURL": "={{ $json.body.websiteURL }}",
"captchaId": "={{ $json.body.captchaId }}",
"geetestApiServerSubdomain": "={{ $json.body.geetestApiServerSubdomain }}",
"optional": {}
},
"type": "n8n-nodes-capsolver.capSolver",
"typeVersion": 1,
"position": [
104,
0
],
"id": "a1b2c3d4-0001-0001-0001-a1b2c3d40002",
"name": "Solve GeeTest V4",
"credentials": {
"capSolverApi": {
"id": "YOUR_CREDENTIAL_ID",
"name": "CapSolver account"
}
}
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "geetest-if-001",
"leftValue": "={{ $json.error }}",
"operator": {
"type": "string",
"operation": "isEmpty",
"singleValue": true
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
408,
0
],
"id": "a1b2c3d4-0001-0001-0001-a1b2c3d40003",
"name": "CapSolver Error?"
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={{ JSON.stringify($json.data) }}",
"options": {}
},
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.5,
"position": [
712,
-80
],
"id": "a1b2c3d4-0001-0001-0001-a1b2c3d40004",
"name": "Respond to Webhook (Success)"
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={{ JSON.stringify({ error: $json.error }) }}",
"options": {}
},
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.5,
"position": [
712,
128
],
"id": "a1b2c3d4-0001-0001-0001-a1b2c3d40005",
"name": "Respond to Webhook (Error)"
}
],
"connections": {
"Webhook Trigger": {
"main": [
[
{
"node": "Solve GeeTest V4",
"type": "main",
"index": 0
}
]
]
},
"Solve GeeTest V4": {
"main": [
[
{
"node": "CapSolver Error?",
"type": "main",
"index": 0
}
]
]
},
"CapSolver Error?": {
"main": [
[
{
"node": "Respond to Webhook (Success)",
"type": "main",
"index": 0
}
],
[
{
"node": "Respond to Webhook (Error)",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
}
}
此工作流每 6 小时(计划)或按需(Webhook)抓取产品页面,使用 HTML 节点提取价格,并将其与之前存储的值进行比较。
计划路径:
每 6 小时 -> 解决 GeeTest V4 -> 获取产品页面 -> 提取数据
-> 比较数据 -> 数据已更改? -> 构建警报 / 未更改
主要行为:
.product-price、h1)提取价格和产品名称$workflow.staticData.lastPrice 在执行之间保留上一个价格deal)和上涨(严重性:info){
"name": "GeeTest V4 Scraping — Price & Product Details — CapSolver + Schedule + Webhook",
"nodes": [
{
"parameters": {
"content": "## GeeTest V4 抓取 — 价格和产品监控器\n\n**适用对象:** 需要监控受 GeeTest V4 保护的网站上的价格或产品数据的团队。\n\n**功能:** 解决 GeeTest V4,获取产品页面,通过 CSS 选择器提取价格和名称,与存储的值进行比较,并在发生变化时发出警报。\n\n**工作原理:**\n1. 计划(每 6 小时)或 Webhook 触发流。\n2. CapSolver 解决 GeeTest V4 挑战。\n3. HTTP 请求使用已解决的令牌获取产品页面。\n4. HTML 节点提取价格和产品名称。\n5. 代码节点将当前价格与存储的价格进行比较 → 如果发生变化则发出警报。\n\n**设置:**\n1. 在 **Settings → Credentials** 下添加您的 CapSolver API 密钥。\n2. 替换占位符 URL 和站点密钥。\n3. 更新 \"提取数据\" 中的 CSS 选择器以匹配您的目标页面。\n4. 将 \"构建警报\" 的输出连接到您的通知渠道。",
"height": 560,
"width": 460,
"color": 1
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-920,
-380
],
"id": "sticky-blog-main-1773678228112-1",
"name": "Sticky Note"
},
{
"parameters": {
"content": "### 计划路径\n每 6 小时自动运行。\n结果存储在工作流静态数据中,用于跨执行比较。",
"height": 480,
"width": 1900,
"color": 6
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-440,
-280
],
"id": "sticky-blog-section-1773678228112-2",
"name": "Sticky Note1"
},
{
"parameters": {
"content": "### Webhook 路径\n按需触发 — 相同逻辑,以 JSON 响应返回结果。",
"height": 480,
"width": 1900,
"color": 6
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-440,
140
],
"id": "sticky-blog-section-1773678228112-3",
"name": "Sticky Note2"
},
{
"parameters": {
"rule": {
"interval": [
{
"field": "hours",
"hoursInterval": 6
}
]
}
},
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.3,
"position": [
-400,
0
],
"id": "99999999-9999-9999-9999-999999999901",
"name": "Every 6 Hours"
},
{
"parameters": {
"operation": "GeeTest V4",
"websiteURL": "https://YOUR-TARGET-SITE.com/product-page",
"captchaId": "YOUR_CAPTCHA_ID_HERE",
"optional": {}
},
"type": "n8n-nodes-capsolver.capSolver",
"typeVersion": 1,
"position": [
-96,
0
],
"id": "99999999-9999-9999-9999-999999999902",
"name": "Solve GeeTest V4",
"credentials": {
"capSolverApi": {
"id": "YOUR_CREDENTIAL_ID",
"name": "CapSolver account"
}
}
},
{
"parameters": {
"method": "POST",
"url": "https://YOUR-TARGET-SITE.com/product-page",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "user-agent",
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36"
}
]
},
"sendBody": true,
"contentType": "form-urlencoded",
"bodyParameters": {
"parameters": [
{
"name": "captcha_id",
"value": "={{ $json.data.solution.captcha_id }}"
},
{
"name": "lot_number",
"value": "={{ $json.data.solution.lot_number }}"
},
{
"name": "pass_token",
"value": "={{ $json.data.solution.pass_token }}"
},
{
"name": "gen_time",
"value": "={{ $json.data.solution.gen_time }}"
},
{
"name": "captcha_output",
"value": "={{ $json.data.solution.captcha_output }}"
}
]
},
"options": {
"response": {
"response": {
"fullResponse": false
}
}
}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.3,
"position": [
208,
0
],
"id": "99999999-9999-9999-9999-999999999903",
"name": "Fetch Product Page"
},
{
"parameters": {
"operation": "extractHtmlContent",
"sourceData": "json",
"dataPropertyName": "data",
"extractionValues": {
"values": [
{
"key": "price",
"cssSelector": ".product-price, [data-price], .price",
"returnValue": "text",
"returnArray": false
},
{
"key": "productName",
"cssSelector": "h1, .product-title",
"returnValue": "text",
"returnArray": false
}
]
},
"options": {}
},
"type": "n8n-nodes-base.html",
"typeVersion": 1.2,
"position": [
512,
0
],
"id": "99999999-9999-9999-9999-999999999904",
"name": "Extract Data"
},
{
"parameters": {
"jsCode": "// 从工作流静态数据中获取当前和上一个价格\nconst staticData = $workflow.staticData;\nconst currentPrice = $input.first().json.price;\nconst previousPrice = staticData.lastPrice;\nconst productName = $input.first().json.productName || 'Product';\n\n// 解析数字值进行比较\nconst parsePrice = (str) => {\n if (!str) return null;\n const match = str.match(/[\\d,]+\\.?\\d*/);\n return match ? parseFloat(match[0].replace(',', '')) : null;\n};\n\nconst currentNum = parsePrice(currentPrice);\nconst previousNum = parsePrice(previousPrice);\n\n// 更新存储的价格\nstaticData.lastPrice = currentPrice;\nstaticData.lastChecked = new Date().toISOString();\n\nconst changed = previousNum !== null && currentNum !== null && currentNum !== previousNum;\nconst direction = changed ? (currentNum < previousNum ? 'dropped' : 'increased') : 'unchanged';\nconst diff = changed ? Math.abs(currentNum - previousNum).toFixed(2) : '0';\n\nreturn [{\n json: {\n productName,\n currentPrice,\n previousPrice: previousPrice || 'first check',\n changed,\n direction,\n diff: changed ? `$${diff}` : null,\n checkedAt: new Date().toISOString()\n }\n}];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
800,
0
],
"id": "99999999-9999-9999-9999-999999999905",
"name": "Compare Data"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "price-if-001",
"leftValue": "={{ $json.changed }}",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
1104,
0
],
"id": "99999999-9999-9999-9999-999999999906",
"name": "Data Changed?"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "alert-001",
"name": "alert",
"value": "=产品 {{ $json.productName }} 的价格 {{ $json.direction }}:{{ $json.previousPrice }} → {{ $json.currentPrice }} ({{ $json.direction === 'dropped' ? '-' : '+' }}{{ $json.diff }})",
"type": "string"
},
{
"id": "alert-002",
"name": "severity",
"value": "={{ $json.direction === 'dropped' ? 'deal' : 'info' }}",
"type": "string"
},
{
"id": "alert-003",
"name": "checkedAt",
"value": "={{ $json.checkedAt }}",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1408,
-80
],
"id": "99999999-9999-9999-9999-999999999907",
"name": "Build Alert"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "nc-001",
"name": "status",
"value": "no_change",
"type": "string"
},
{
"id": "nc-002",
"name": "currentPrice",
"value": "={{ $json.currentPrice }}",
"type": "string"
},
{
"id": "nc-003",
"name": "checkedAt",
"value": "={{ $json.checkedAt }}",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1408,
128
],
"id": "99999999-9999-9999-9999-999999999908",
"name": "No Change"
},
{
"parameters": {
"httpMethod": "POST",
"path": "price-monitor-geetest-v4",
"responseMode": "responseNode",
"options": {}
},
"type": "n8n-nodes-base.webhook",
"typeVersion": 2.1,
"position": [
-400,
420
],
"id": "99999999-9999-9999-9999-999999999909",
"name": "Webhook Trigger",
"webhookId": "99999999-aaaa-bbbb-cccc-999999999909",
"onError": "continueRegularOutput"
},
{
"parameters": {
"operation": "GeeTest V4",
"websiteURL": "https://YOUR-TARGET-SITE.com/product-page",
"captchaId": "YOUR_CAPTCHA_ID_HERE",
"optional": {}
},
"type": "n8n-nodes-capsolver.capSolver",
"typeVersion": 1,
"position": [
-96,
420
],
"id": "99999999-9999-9999-9999-999999999910",
"name": "Solve GeeTest V4 [Webhook]",
"credentials": {
"capSolverApi": {
"id": "YOUR_CREDENTIAL_ID",
"name": "CapSolver account"
}
}
},
{
"parameters": {
"method": "POST",
"url": "https://YOUR-TARGET-SITE.com/product-page",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "user-agent",
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36"
}
]
},
"sendBody": true,
"contentType": "form-urlencoded",
"bodyParameters": {
"parameters": [
{
"name": "captcha_id",
"value": "={{ $json.data.solution.captcha_id }}"
},
{
"name": "lot_number",
"value": "={{ $json.data.solution.lot_number }}"
},
{
"name": "pass_token",
"value": "={{ $json.data.solution.pass_token }}"
},
{
"name": "gen_time",
"value": "={{ $json.data.solution.gen_time }}"
},
{
"name": "captcha_output",
"value": "={{ $json.data.solution.captcha_output }}"
}
]
},
"options": {
"response": {
"response": {
"fullResponse": false
}
}
}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.3,
"position": [
208,
420
],
"id": "99999999-9999-9999-9999-999999999911",
"name": "Fetch Product Page [Webhook]"
},
{
"parameters": {
"operation": "extractHtmlContent",
"sourceData": "json",
"dataPropertyName": "data",
"extractionValues": {
"values": [
{
"key": "price",
"cssSelector": ".product-price, [data-price], .price",
"returnValue": "text",
"returnArray": false
},
{
"key": "productName",
"cssSelector": "h1, .product-title",
"returnValue": "text",
"returnArray": false
}
]
},
"options": {}
},
"type": "n8n-nodes-base.html",
"typeVersion": 1.2,
"position": [
512,
420
],
"id": "99999999-9999-9999-9999-999999999912",
"name": "Extract Data [Webhook]"
},
{
"parameters": {
"jsCode": "// 从工作流静态数据中获取当前和上一个价格\nconst staticData = $workflow.staticData;\nconst currentPrice = $input.first().json.price;\nconst previousPrice = staticData.lastPrice;\nconst productName = $input.first().json.productName || 'Product';\n\n// 解析数字值进行比较\nconst parsePrice = (str) => {\n if (!str) return null;\n const match = str.match(/[\\d,]+\\.?\\d*/);\n return match ? parseFloat(match[0].replace(',', '')) : null;\n};\n\nconst currentNum = parsePrice(currentPrice);\nconst previousNum = parsePrice(previousPrice);\n\n// 更新存储的价格\nstaticData.lastPrice = currentPrice;\nstaticData.lastChecked = new Date().toISOString();\n\nconst changed = previousNum !== null && currentNum !== null && currentNum !== previousNum;\nconst direction = changed ? (currentNum < previousNum ? 'dropped' : 'increased') : 'unchanged';\nconst diff = changed ? Math.abs(currentNum - previousNum).toFixed(2) : '0';\n\nreturn [{\n json: {\n productName,\n currentPrice,\n previousPrice: previousPrice || 'first check',\n changed,\n direction,\n diff: changed ? `$${diff}` : null,\n checkedAt: new Date().toISOString()\n }\n}];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
800,
420
],
"id": "99999999-9999-9999-9999-999999999913",
"name": "Compare Data [Webhook]"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "price-if-002",
"leftValue": "={{ $json.changed }}",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
1104,
420
],
"id": "99999999-9999-9999-9999-999999999914",
"name": "Data Changed? [Webhook]"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "alert-004",
"name": "alert",
"value": "=产品 {{ $json.productName }} 的价格 {{ $json.direction }}:{{ $json.previousPrice }} → {{ $json.currentPrice }} ({{ $json.direction === 'dropped' ? '-' : '+' }}{{ $json.diff }})",
"type": "string"
},
{
"id": "alert-005",
"name": "severity",
"value": "={{ $json.direction === 'dropped' ? 'deal' : 'info' }}",
"type": "string"
},
{
"id": "alert-006",
"name": "checkedAt",
"value": "={{ $json.checkedAt }}",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1408,
340
],
"id": "99999999-9999-9999-9999-999999999915",
"name": "Build Alert [Webhook]"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "nc-004",
"name": "status",
"value": "no_change",
"type": "string"
},
{
"id": "nc-005",
"name": "currentPrice",
"value": "={{ $json.currentPrice }}",
"type": "string"
},
{
"id": "nc-006",
"name": "checkedAt",
"value": "={{ $json.checkedAt }}",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1408,
548
],
"id": "99999999-9999-9999-9999-999999999916",
"name": "No Change [Webhook]"
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={{ JSON.stringify($json) }}",
"options": {}
},
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.5,
"position": [
1712,
420
],
"id": "99999999-9999-9999-9999-999999999917",
"name": "Respond to Webhook [Webhook]"
}
],
"connections": {
"Every 6 Hours": {
"main": [
[
{
"node": "Solve GeeTest V4",
"type": "main",
"index": 0
}
]
]
},
"Solve GeeTest V4": {
"main": [
[
{
"node": "Fetch Product Page",
"type": "main",
"index": 0
}
]
]
},
"Fetch Product Page": {
"main": [
[
{
"node": "Extract Data",
"type": "main",
"index": 0
}
]
]
},
"Extract Data": {
"main": [
[
{
"node": "Compare Data",
"type": "main",
"index": 0
}
]
]
},
"Compare Data": {
"main": [
[
{
"node": "Data Changed?",
"type": "main",
"index": 0
}
]
]
},
"Data Changed?": {
"main": [
[
{
"node": "Build Alert",
"type": "main",
"index": 0
}
],
[
{
"node": "No Change",
"type": "main",
"index": 0
}
]
]
},
"Webhook Trigger": {
"main": [
[
{
"node": "Solve GeeTest V4 [Webhook]",
"type": "main",
"index": 0
}
]
]
},
"Solve GeeTest V4 [Webhook]": {
"main": [
[
{
"node": "Fetch Product Page [Webhook]",
"type": "main",
"index": 0
}
]
]
},
"Fetch Product Page [Webhook]": {
"main": [
[
{
"node": "Extract Data [Webhook]",
"type": "main",
"index": 0
}
]
]
},
"Extract Data [Webhook]": {
"main": [
[
{
"node": "Compare Data [Webhook]",
"type": "main",
"index": 0
}
]
]
},
"Compare Data [Webhook]": {
"main": [
[
{
"node": "Data Changed? [Webhook]",
"type": "main",
"index": 0
}
]
]
},
"Data Changed? [Webhook]": {
"main": [
[
{
"node": "Build Alert [Webhook]",
"type": "main",
"index": 0
}
],
[
{
"node": "No Change [Webhook]",
"type": "main",
"index": 0
}
]
]
},
"Build Alert [Webhook]": {
"main": [
[
{
"node": "Respond to Webhook [Webhook]",
"type": "main",
"index": 0
}
]
]
},
"No Change [Webhook]": {
"main": [
[
{
"node": "Respond to Webhook [Webhook]",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
}
}
此工作流自动化了从头到尾提交受 GeeTest V4 保护的登录表单。它在提交凭据之前解决了 GeeTest V4 挑战。
此工作流由五个节点组成:
| 设置 | 值 |
|---|---|
| HTTP 方法 | POST |
| 路径 | login-geetest-v4 |
| 响应 | Response Node |
这将在以下位置创建端点:https://your-n8n-instance.com/webhook/login-geetest-v4
| 参数 | 值 |
|---|---|
| 操作 | GeeTest V4 |
| 网站 URL | https://YOUR-TARGET-SITE.com/login |
| 验证码 ID | YOUR_CAPTCHA_ID_HERE |
确保还选择了您的 CapSolver 凭据。
| 设置 | 值 |
|---|---|
| 方法 | POST |
| URL | https://YOUR-TARGET-SITE.com/login |
| 内容类型 | form-urlencoded |
| 正文参数 | username=YOUR_USERNAME, password=YOUR_PASSWORD, captcha_id={{ $('Solve GeeTest V4').item.json.data.solution.captcha_id }}, lot_number={{ $('Solve GeeTest V4').item.json.data.solution.lot_number }}, pass_token={{ $('Solve GeeTest V4').item.json.data.solution.pass_token }}, gen_time={{ $('Solve GeeTest V4').item.json.data.solution.gen_time }}, captcha_output={{ $('Solve GeeTest V4').item.json.data.solution.captcha_output }} |
重要提示: 将
YOUR_USERNAME和YOUR_PASSWORD替换为您的实际凭据。此外,您可能需要调整表单字段名称以匹配您的目标网站的 HTML。
| 设置 | 值 |
|---|---|
| 响应方式 | JSON |
| 响应正文 | ={{ JSON.stringify($json) }} |
向您的 Webhook 端点发送 POST 请求:
curl -X POST https://your-n8n-instance.com/webhook/login-geetest-v4 \
-H "Content-Type: application/json" \
-d '{
"websiteURL": "https://example.com/login",
"captchaId": "e392e1d7fd421dc63325744d5a2b9c73",
"username": "testuser",
"password": "testpass"
}'
预期响应 (成功):
{
"status": "success",
"message": "Login successful",
"solution": {
"captcha_id": "e392e1d7fd421dc63325744d5a2b9c73",
"lot_number": "7c18c041a6ed4e...",
"pass_token": "d88ce40c0a5c5a18...",
"gen_time": "1709123456",
"captcha_output": "dGVzdF9jYXB0Y2hh..."
}
}
预期响应 (失败):
{
"status": "failed",
"message": "Login failed: Invalid credentials or captcha",
"error": "..."
}
复制下面的 JSON 并通过 Menu > Import from JSON 将其导入 n8n:
{
"name": "GeeTest V4 Account Login — CapSolver + Schedule + Webhook",
"nodes": [
{
"parameters": {
"content": "## GeeTest V4 账户登录自动化 — CapSolver + 计划 + Webhook\n\n**适用对象:** 需要自动化登录受 GeeTest V4 保护的账户的团队。\n\n**功能:** 解决 GeeTest V4 挑战并使用已解决的令牌和用户凭据提交登录表单。\n\n**工作原理:**\n1. Webhook 触发流。\n2. CapSolver 解决 GeeTest V4 挑战。\n3. HTTP 请求使用已解决的令牌和用户凭据提交登录表单。\n4. Webhook 返回登录结果。\n\n**设置:**\n1. 在 **Settings → Credentials** 下添加您的 CapSolver API 密钥。\n2. 替换占位符 URL 和凭据。\n3. 调整表单字段名称以匹配您的目标网站。\n4. 激活工作流。",
"height": 480,
"width": 460,
"color": 1
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-728,
-400
],
"id": "sticky-blog-main-1773678228112-1",
"name": "Sticky Note"
},
{
"parameters": {
"httpMethod": "POST",
"path": "login-geetest-v4",
"responseMode": "responseNode",
"options": {}
},
"type": "n8n-nodes-base.webhook",
"typeVersion": 2.1,
"position": [
-400,
0
],
"id": "a2b3c4d5-0001-0001-0001-a2b3c4d50001",
"name": "Webhook Trigger",
"webhookId": "a2b3c4d5-aaaa-bbbb-cccc-a2b3c4d50001",
"onError": "continueRegularOutput"
},
{
"parameters": {
"operation": "GeeTest V4",
"websiteURL": "={{ $json.body.websiteURL }}",
"captchaId": "={{ $json.body.captchaId }}",
"optional": {}
},
"type": "n8n-nodes-capsolver.capSolver",
"typeVersion": 1,
"position": [
-96,
0
],
"id": "a2b3c4d5-0001-0001-0001-a2b3c4d50002",
"name": "Solve GeeTest V4",
"credentials": {
"capSolverApi": {
"id": "YOUR_CREDENTIAL_ID",
"name": "CapSolver account"
}
}
},
{
"parameters": {
"method": "POST",
"url": "={{ $json.body.websiteURL }}",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "user-agent",
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36"
},
{
"name": "Content-Type",
"value": "application/x-www-form-urlencoded"
}
]
},
"sendBody": true,
"contentType": "form-urlencoded",
"bodyParameters": {
"parameters": [
{
"name": "username",
"value": "={{ $json.body.username }}"
},
{
"name": "password",
"value": "={{ $json.body.password }}"
},
{
"name": "captcha_id",
"value": "={{ $('Solve GeeTest V4').item.json.data.solution.captcha_id }}"
},
{
"name": "lot_number",
"value": "={{ $('Solve GeeTest V4').item.json.data.solution.lot_number }}"
},
{
"name": "pass_token",
"value": "={{ $('Solve GeeTest V4').item.json.data.solution.pass_token }}"
},
{
"name": "gen_time",
"value": "={{ $('Solve GeeTest V4').item.json.data.solution.gen_time }}"
},
{
"name": "captcha_output",
"value": "={{ $('Solve GeeTest V4').item.json.data.solution.captcha_output }}"
}
]
},
"options": {
"response": {
"response": {
"fullResponse": false
}
}
}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.3,
"position": [
208,
0
],
"id": "a2b3c4d5-0001-0001-0001-a2b3c4d50003",
"name": "Submit Login Form"
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={{ JSON.stringify($json) }}",
"options": {}
},
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.5,
"position": [
512,
0
],
"id": "a2b3c4d5-0001-0001-0001-a2b3c4d50004",
"name": "Respond to Webhook"
}
],
"connections": {
"Webhook Trigger": {
"main": [
[
{
"node": "Solve GeeTest V4",
"type": "main",
"index": 0
}
]
]
},
"Solve GeeTest V4": {
"main": [
[
{
"node": "Submit Login Form",
"type": "main",
"index": 0
}
]
]
},
"Submit Login Form": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
}
}
此错误表示您的 CapSolver 账户或计划不包含 GeeTest V4 访问权限。请检查您的 CapSolver Dashboard 以确认此服务是否包含在您的计划中。
此错误表示您在 CapSolver 节点中提供的 websiteURL 参数不正确。请仔细检查目标网站的开发者工具网络选项卡,以确保您使用的是正确的值。
如果即使 GeeTest V4 已成功解决,登录仍然失败,问题可能出在以下几点:
此错误表示您在 n8n 中配置的 CapSolver API 密钥不正确或已过期。请检查您的 CapSolver Dashboard 并更新 n8n 中的凭据。
websiteURL 和任何可选参数(如 captchaId 和 geetestApiServerSubdomain)是否正确。这些对于 GeeTest V4 的成功解决至关重要。准备好开始了吗? 注册 CapSolver 并使用奖励代码 n8n,您的首次充值可额外获得 8% 的奖励!

GeeTest V4 是极验行为验证码系统的最新一代,它使用自适应挑战和行为分析来保护网站。
GeeTest V4 在结构上比 V3 更简单,它只需要一个静态的 captchaId 参数,而不是 V3 所需的动态挑战流程。它还使用 gcaptcha4.js 脚本并返回 5 个解决方案字段。
价格因使用情况而异。请查看 CapSolver 定价页面 以获取 GeeTest V4 的当前价格。GeeTest V4 解决方案任务比简单的图像到文本识别更昂贵,但比其他复杂的验证码类型更便宜。
GeeTest V4 解决方案任务通常需要 10 到 30 秒,具体取决于挑战的复杂性和 CapSolver 服务器负载。与 ImageToTextTask 不同,GeeTest V4 解决方案涉及任务创建和轮询,因此不是即时的。
CapSolver 的 GeeTest V4 解决方案服务通常不需要您提供代理。CapSolver 在内部处理代理要求。您只需提供 websiteURL 和 captchaId。
如果您的 GeeTest V4 令牌未被接受,请检查以下内容:
websiteURL 和 captchaId 参数正确。如果即使 GeeTest V4 已成功解决,登录仍然失败,请检查以下内容:
是的。此工作流适用于自托管 n8n 和 n8n Cloud。CapSolver 节点已作为官方集成提供。您只需添加您的 API 凭据。