如果我有 Blogger 博客上的帖子 ID,如何将该 ID 转换为链接到帖子的 URL?
我的最终目标是将帖子从我的 Blogger 站点拉到我自己的站点,然后能够永久链接到实际帖子。我通过使用 Javascript 为我的博客解析 RSS 提要来做到这一点。不幸的是,RSS 提要中的“链接”字段不是博客文章的 URL……它是评论提要的 URL。但是,我可以获取帖子 ID,我认为这是查找帖子 URL 的好方法。任何其他建议表示赞赏。
编辑:经过进一步检查,我发现实际的帖子链接包含在 RSS 提要中。我用来解析 RSS 提要的库给了我错误的链接。然而,主要问题仍然存在。
编辑:仍然无法获得直接链接。这是我为单个条目获得的链接示例:
<link rel="replies" type="application/atom+xml" href="http://chadsharpe.blogspot.com/feeds/2276618748913180797/comments/default" title="Post Comments">
<link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=4528045192864780582&postID=2276618748913180797" title="2 Comments">
<link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4528045192864780582/posts/default/2276618748913180797?v=2">
<link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4528045192864780582/posts/default/2276618748913180797?v=2">
<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Funwhenwet/~3/PuX-Fqz_xKE/sharpe-watson-bomb-chris-o-jimmy.html" title="Sharpe, Watson, Bomb, Chris O, Jimmy">
我想要的网址是:
http://chadsharpe.blogspot.com/2010/08/sharpe-watson-bomb-chris-o-jimmy.html