首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >从JSON中的subreddit获取新帖子

从JSON中的subreddit获取新帖子
EN

Stack Overflow用户
提问于 2011-05-31 13:23:33
回答 2查看 34.5K关注 0票数 24

我该如何在JSON中获取subreddit的帖子?只需将.json附加到url (http://www.reddit.com/r/SOME_SUBREDDIT/new.json)即可返回以下内容:

代码语言:javascript
复制
{
    kind: "Listing"
    -
    data: {
        modhash: ""
        children: [ ]
        after: null
        before: null
    }
}

子数组不包含任何帖子。我发现http://www.reddit.com/r/SOME_SUBREDDIT/new实际上路由到new?sort=rising,而我需要的是new?sort=new

当然,/new?sort=new.json也不能工作。

EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/6183318

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档