Google Reader 如何获取 RSS feed 中的每个项目?
Slashdot 的 RSS 源是 http://rss.slashdot.org/Slashdot/slashdot。 如果我直接下载 XML 文件,我只能得到今天的一些帖子。 然而,如果我订阅 Google Reader 中的提要,并在其“无限滚动”界面中继续向下滚动,似乎我可以获得过去任意数量的 Slashdot 帖子 - 也许我可以获得每一个 Slashdot 帖子?
- Google Reader 如何从 RSS feed 中检索无限数量的帖子?
- 我怎样才能做同样的事情?
Slashdot's RSS feed is http://rss.slashdot.org/Slashdot/slashdot. If I download the XML file directly, I only get a few of the posts from today. However, if I subscribe to the feed in Google Reader, and keep scrolling down in their "infinite scroll" interface, it seems like I can get an arbitrary number of Slashdot posts from the past - maybe I can get every Slashdot post ever?
- How does Google Reader retrieve an unlimited number of posts from an RSS feed?
- How can I do the same?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
谷歌为其所有用户跟踪该提要的一个实例,因此他们早在任何新订阅者开始阅读之前就一直在跟踪和存储 Slashdot 文章。
要执行相同的操作,您必须定期轮询所需的 RSS 源,并将您在本地找到的任何独特文章存储起来。
Google follows one instance of the feed for all its users, so they've been tracking and storing Slashdot articles, for example, long before any new subscriber starts reading.
To do the same, you would have to poll the RSS feeds you want at regular intervals and store any unique articles you find locally.
我刚刚发现,如果您经过身份验证,您可以执行以下操作:
http://www.google.com/reader/atom/feed/http://rss.slashdot.org/Slashdot/slashdot?n=100
获取来自提要的任意数量的结果。
I just discovered that if you're authenticated you can do something like:
http://www.google.com/reader/atom/feed/http://rss.slashdot.org/Slashdot/slashdot?n=100
to get an arbitrary number of results from a feed.
他们多年来一直在为网络建立索引,并存储他们访问的所有内容。 因此,当您向页面添加“订阅此”链接时,谷歌爬虫将开始对该页面建立索引并存储它。
对于 RSS,它们还具有让多人订阅同一个提要的好处。
因此,对于您的应用程序,我建议通过在本地保存所有下载的项目来解决此问题,以便新订阅者可以返回到第一个用户订阅该提要的时间点。 它不会为您提供无限的存储空间,但随着时间的推移,它将为您提供更大的存档,而不仅仅是 20 个最新项目。
They have been indexing the web for years, and store everything they come over. So the moment you add a "subscribe to this" link to your page, the google crawler will start indexing that page and store it.
For RSS they also have the benefit of having multiple people subscribing to the same feed.
So for your application I suggest solving this by saving any downloaded items locally, so that new subscribes can go back to the point in time the first user subscribed to that feed. It won't give you unlimited, but over time it will give you a much larger archive than just the 20 latest items.
我构建了一个 RSS 存档服务,可以实现您所说的功能 (https://app.pub.center )。 所有 RSS 均可通过 REST 免费使用。 如果您想要推送通知,则必须切换到付费计划。
PubCenter 每天轮询其 RSS 提要目录,并缓存文章。 然后,您可以按时间顺序检索这些文章。 例如:
《大西洋月刊》第 1 页
https://pub.center/feed/02702624d8a4c825dde21af94e9169773454e0c3/articles?limit=10&page=1
《大西洋月刊》第 2 页
https://pub.中心/feed/02702624d8a4c825dde21af94e9169773454e0c3/articles?limit=10&page=2
I built a RSS archival service that does what you're talking about (https://app.pub.center). All of the RSS is free to use via REST. If you want push notifications you have to switch to a paid plan.
PubCenter daily polls it's catalog of RSS feeds, and caches the articles. Then, you can get these articles back in a chronological order. For example:
Page 1 of The Atlantic
https://pub.center/feed/02702624d8a4c825dde21af94e9169773454e0c3/articles?limit=10&page=1
Page 2 of The Atlantic
https://pub.center/feed/02702624d8a4c825dde21af94e9169773454e0c3/articles?limit=10&page=2