gpt4 book ai didi

api - Reddit API 中的 children 参数是什么?

转载 作者:行者123 更新时间:2023-12-04 04:38:04 26 4
gpt4 key购买 nike

我正在尝试使用 Reddit API 从特定故事中获取评论列表。

我正在使用 API 调用 POST api/morechildren并且不知道为 children 参数放置什么。文档说它必须是“以逗号分隔的评论 ID 列表”。我不确定评论 ID 是什么样的,有人知道这是什么吗?如果是这样,请举例说明...

最佳答案

I am not sure what the comment IDs look like, is there anyone that knows what this is?



评论 ID 看起来像 t1_BASE36ID . BASE36IDchildren 下列出的值在提交响应中。例如,如果您获取 URL http://www.reddit.com/r/redditdev/comments/w60cs/using_morechildren_without_praw/.json?limit=2 json 响应的一部分是:
kind: "Listing",
data: {
modhash: "reswq423o8daa6014e3fbf914e0572a5fe6c17a66b599e0671",
children: [
{
kind: "more",
data: {
count: 9,
parent_id: "t1_c5akqs1",
children: [
"c5anb3r",
"c5b9z4g"
],
name: "t1_c5anb3r",
id: "c5anb3r"
}
}
],
after: null,
before: null
}

您需要将该子 BASE36ID 列表转换为 t1_c5anb3r,t1_c5b9z4g .

关于api - Reddit API 中的 children 参数是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19391307/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com