Google 阅读器订阅网址

发布于 2024-09-10 11:46:29 字数 1285 浏览 3 评论 0原文

我正在尝试创建一个链接,允许用户直接在 Google Reader 中订阅提要(绕过 iGoogle 选项)。我尝试了几个目标网址:

大多数情况下,每个 Feed 似乎都按预期工作,但我遇到了一些无法正常工作的 Feed。偏差因素似乎是不起作用的 URL 都有自己的查询字符串。一个例子是 http://majicjungle.com/blog/?feed=atom

对我来说更奇怪的是,这些似乎在我第一次尝试订阅时起作用,但如果我关闭窗口并返回到相同的 URL,则不起作用。我在重定向之前对 Feed URI 进行编码,因此我有:

window.location.replace( 'http://www.google.com/reader/view/feed/' +encodeURIComponent( feed_uri ) );

第一次重定向时,我最终到达 http://www.google.com/reader/view/feed/http%3A%2F%2Fblog.squirrelapp.com%2F%3Ffeed%3Drss2 URI 组件按预期编码。但是,如果我关闭该窗口并执行完全相同的步骤,我最终会到达 http://www.google.com/reader/view/feed/http://blog.squirrelapp.com/?feed =rss2#stream/feed%2Fhttp%3A%2F%2Fblog.squirrelapp.com%2F

不仅提要 URL 被解码,而且 Google Reader 端也发生了非常明显的重定向。第一次之后每次都会发生这种情况。有没有其他人有过这种经历,知道发生了什么和/或知道如何解决它?

我已经使用试错法(结合很多很多的搜索)已经好几天了,而且我不断地发现事情的错误一面。任何帮助或见解将不胜感激。

I'm trying to create a link that allows a user to subscribe to a feed directly in Google Reader (bypassing the iGoogle option). I've tried several target URLs:

Each seems to work as expected most of the time, but I've bumped into a couple of feeds that don't. The deviating factor seems to be that the URLs that don't work all have a query string of their own. One example is http://majicjungle.com/blog/?feed=atom.

What's even more strange to me is that these seem to work the very first time I try to subscribe, but if I close the window and return to the same URL, it doesn't. I'm encoding the feed URI before redirection so I have:

window.location.replace( 'http://www.google.com/reader/view/feed/' + encodeURIComponent( feed_uri ) );

The first time I redirect, I end up at http://www.google.com/reader/view/feed/http%3A%2F%2Fblog.squirrelapp.com%2F%3Ffeed%3Drss2 with the URI components encoded as expected. If I close that window and go through the exact same steps, though, I end up at http://www.google.com/reader/view/feed/http://blog.squirrelapp.com/?feed=rss2#stream/feed%2Fhttp%3A%2F%2Fblog.squirrelapp.com%2F.

Not only is the feed URL decoded, but there's also a very obvious redirection happening at the Google Reader end. This happens every time after the first. Has anyone else had this experience, know what's happening and/or know how to fix it?

I've been working the trial and error method (combined with many, many searches) for days now and I keep coming up on the error side of things. Any help or insight would be much appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

余罪 2024-09-17 11:46:29

您是否尝试过直接使用网址的片段版本,例如:

http://www.google.com/reader/view/#stream/feed/http%3A%2F%2Fblog.squirrelapp.com%2F%3Ffeed%3Drss2< /a>

URL 的转义是 Safari 的一个错误,因为在 Chrome 或任何其他浏览器中不会发生同样的问题。

Have you tried using the fragment version of the URL directly, e.g.:

http://www.google.com/reader/view/#stream/feed/http%3A%2F%2Fblog.squirrelapp.com%2F%3Ffeed%3Drss2

The unescaping of the URL is a Safari bug, since the same problem does not occur in Chrome or any other browser.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文