gpt4 book ai didi

api - 从 JSON 中的 subreddit 获取新帖子

转载 作者:行者123 更新时间:2023-12-03 11:04:56 25 4
gpt4 key购买 nike

我将如何获得 新品 JSON 中 subreddit 的帖子?只需将 .json 附加到 url (http://www.reddit.com/r/SOME_SUBREDDIT/new.json) 就会返回以下内容:

{
kind: "Listing"
-
data: {
modhash: ""
children: [ ]
after: null
before: null
}
}

children 数组不包含任何帖子。我来找那个 http://www.reddit.com/r/SOME_SUBREDDIT/new实际上路由到 new?sort=rising 当我需要的是 新?排序=新 .

/new?sort=new.json 当然不会工作。

最佳答案

.json修饰符应该放在路径组件的末尾,而不是整个 URL。您要查找的网址是:

http://www.reddit.com/r/subreddit/new.json?sort=new

关于api - 从 JSON 中的 subreddit 获取新帖子,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6183318/

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