我想从tumblr博客拉,并使用JavaScript在另一个网页上显示它。阅读json,直到“更多”评论
我使用的是$ TUMBLR_BLOG/api/read/json feed,它提供了一个充满博客文章信息的变量。
我想打印一切,直到"<!-- more -->"
字符集的'正规体'部分,即。我不想在“常规体”中打印所有内容,直到更多部分。
有关如何做到这一点的想法?
例如, API阅读:http://blog.intercut.yegfilm.ca/api/read/json
例如。我正在使用的基本代码:
<script type="text/javascript" src="http://blog.intercut.yegfilm.ca/api/read/json"></script>
<script type="text/javascript">
// The variable "tumblr_api_read" is now set.
document.write(
'<h3> <a href="' + tumblr_api_read.posts[0]['url'] + '">' + tumblr_api_read.posts[0]['regular-title'] + '</a></h3>' +
tumblr_api_read.posts[0]['regular-body']);
</script>