> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fetchhive.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Reddit 评论

> 配置一个工作流步骤，根据 URL 读取 Reddit 帖子下的评论

# Reddit 评论

当你想了解人们在 Reddit 帖子下说了什么——提出的问题、给出的回答以及获得最多投票的评论——时，使用 **Reddit Comments**。典型用途是在撰写文章前收集受众提出的问题。

## 配置

| 选项 | 必填 | 说明 |
| - | - | - |
| Name | 否 | 工作流画布上的步骤标签。 |
| URL | 是 | Reddit 帖子或评论串 URL，例如 `https://www.reddit.com/r/python/comments/1asdf12/how_do_i_start_learning_python/`。 此字段支持通过 **Insert Variable** 使用工作流变量。 |
| When the step fails | 否 | 控制此步骤失败时工作流应 **Terminate Workflow** 还是 **Continue**。 |

从 **Search steps...** 的 **Content & Social** 分组中添加此步骤。

Reddit 抓取有时可能需要几分钟，因此运行可能会持续一段时间，之后才会出现记录。

## 输出

点击步骤标题栏中的 **Run** 测试该步骤。运行完成后，Fetch Hive 会在 **Output** 中显示记录。

在后续步骤中使用变量选择器，可插入该次运行可用的准确输出路径。该步骤返回记录列表，因此完整结果为：

```text theme={null}
{{step_2.output}}
```

输出是一个列表，没有 `items` 或 `results` 外层。要使用第一条记录：

```text theme={null}
{{step_2.output[0]}}
```

每条记录包括：

| 字段 | 含义 |
| - | - |
| `comment_id` | 评论 ID。 |
| `url` | 评论 URL。 |
| `comment` | 评论内容。 |
| `user_posted` | 评论者用户名。 |
| `date_posted` | 评论时间。 |
| `num_upvotes` | 点赞数。 |
| `num_replies` | 回复数。 |
| `replies` | 对该评论的回复。 |
| `post_url` | 评论所属帖子的 URL。 |
| `post_id` | 该帖子的 ID。 |
| `community_name` | 子版块名称。 |
| `is_moderator` | 评论者是否为版主。 |
| `is_pinned` | 评论是否置顶。 |

## 示例

从 **Search steps...** 的 **Content & Social** 分组中添加 **Reddit 评论**。

将 **Name** 设为类似 `Reddit 评论` 的名称。

在 **URL** 中输入Reddit 帖子或评论串 URL，或点击 **Insert Variable** 使用先前步骤或工作流输入中的值。

点击 **Run**，在 **Output** 中查看记录。

## 说明

* 每条评论为一个条目。热门帖子可能有数百条评论，因此单次运行最多返回 500 条。
* 费用随返回的评论数量增加。
* 每次运行至少消耗 2 个任务积分。费用随返回的记录数量增加。请参阅 [任务费用](https://docs.fetchhive.com/zh/resources/task-costs.md)。

另请参阅：[Reddit 帖子](https://docs.fetchhive.com/zh/workflows/steps/web-research/reddit-posts.md)、[创建和编辑](https://docs.fetchhive.com/zh/workflows/creating-and-editing.md)、[测试与迭代](https://docs.fetchhive.com/zh/workflows/testing-and-iteration.md) 和 [错误处理](https://docs.fetchhive.com/zh/workflows/error-handling.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.