I am aware of this syntax to get around the default 25 items limit when subscribing to Reddit RSS feeds:
http://reddit.com/r/[subreddit].rss?limit=[limit]
My question is, is there an upper limit on "limit"? For example, if I put in, say 500, would I get 500 items each time the feed updated or does Reddit just have a number which you can't exceed for "limit"?
Similarly, is there such syntax for subscribing to Tumblr and LiveJournal feeds, to get around whatever the default setting is? If so, is there an upper limit?
Thanks!
This is not part of the RSS spec in any way I would not expect that to work with Tumblr or LiveJournal. Actually, I would not expect that to work beyond Reddit...
Related
I am creating an RSS feed for a website I am working on. I read about RSS and it is pretty simple: It is a specially formatted XML file.
However, I could not find information about the following two questions
Is there a limit to the number of entries/items in an RSS feed? Should I have 10 entries only? Or can I go up to 100 for example? What if I have more entries than 100 per day? What can I do?
Can I have pages with each page displaying 10? So for example, www.emample.com/rss/ will give page 1, and www.example.com/rss/2 will give page 2 of RSS, and www.example.com/rss/3 will give page 3, and so on. The reason for this question is the following: If I am restricted to only 10 rss items, what happens if I have 50 items updated to the site since my last RSS update?
Thanks.
Is there a limit to the number of entries/items in an RSS feed? Should I have 10 entries only? Or can I go up to 100 for example? What if I have more entries than 100 per day? What can I do?
Depends on version of RSS used. If you're using the UserLand RSS 0.91 spec, for example, the number of item in a channel should be limited to 15 according to info in the RSS 2.0 spec. If you think of RSS as a format for periodic updates this makes sense—though it can be limiting.
If you look at jekyll-feed RubyGem—which uses Atom and is deployed on GitHub Pages sites—the number of posts is limited to 10. But you can do whatever your want as long as the spec permits.
For example, if you have more than 100 entries per day you're obviously going to want to increase the number and RSS 2.0 (and maybe Atom?) is fine with that. To signify to the RSS user agent the content is updated with a high frequency you can use the Syndication module to output time:
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
(Don't forget to add the XML namespace when using.)
Just keep in mind if you're using the Content module to output the full text of an an article in a CDATASection you're probably going to want to truncate some text if the sections are large.
Can I have pages with each page displaying 10?
Yes, though if you do you should probably have an RSS for your RSS to indicate the pages and use guid without a URL to ensure they're properly identified and deduped by the feed reader. This is also going to depend on the RSS user agent and what your desired results are.
And just for fun here are some modules for RSS 2.0 which make it very extensible:
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
Only use what you need and drop namespaces you aren't using.
Another option is to look at Atom, which is another format read by all modern readers transparently (no one will notice this is Atom or RSS). Atom has pagination as per this RFC.
Generally, though, pagination is not widely used to say the least... so you probably don't need to bother too much!
Whether you pick RSS or Atom, it's useless to make your feeds "too large". Stick to a small-ish number of items, between 10 and 20, depending on how often you publish items.
Also think about implementing PubSubHubbub which is a fairly simple publish/subscribe protocol which will let anyone interested in your content know that a given feed has updated.
RSS 2.0 Specification:
In RSS 0.91, various elements are restricted to 500 or 100 characters.
There can be no more than 15 s in a 0.91 . There are no
string-length or XML-level limits in RSS 0.92 and greater. Processors
may impose their own limits, and generators may have preferences that
say no more than a certain number of s can appear in a channel,
or that strings are limited in length.
In RSS 2.0, a provision is made for linking a channel to its
identifier in a cataloging system, using the channel-level category
feature, described above. For example, to link a channel to its
Syndic8 identifier, include a category element as a sub-element of
, with domain "Syndic8", and value the identifier for your
channel in the Syndic8 database. The appropriate category element for
Scripting News would be 1765.
An RSS file is primarily used to tell subscribers when there's is new content on your site. You would generally set the number of s in your feed to reasonably accommodate the number of pages that change on a regular basis over a certain period.
If you want the SEs to know about your pages then another type of XML file would be suggested; site maps.
Is there a way to get Google and Bing news searches as RSS?
I'd like to have the most recent at the top of the results (ordered by time) if possible.
And show 100 results if that is possible.
I found this for Google, but it only shows 5 items or so, not that great.
https://news.google.com/news/feeds?output=rss&q=politics
I just want to search their news categories and get results as RSS.
You are right that Google no longer publicly shows RSS feeds for News searches. But there's a basic URL format that should continue to work.
If my search topic is "education", my search URL should look like:
https://news.google.com/news/section?cf=all&ned=us&q=education
Replace:
value of ned (probably stands for 'news edition'), i.e. us with the appropriate country code that's relevant to you. E.g. uk (not gb for UK), in (India), etc.
value of q (probably stands for 'search query'), i.e. education with your search term. Combine multiple words with a plus sign, e.g. education+policy (if your search is for 'Education Policy').
Now the RSS feed button in your browser should've become active because an RSS feed is available for the page. It shows 10 latest news items in the feed, not 5. And the RSS feed URL would look like this:
https://news.google.com/news/feeds?cf=all&ned=us&hl=en&q=education&output=rss
Conclusion: RSS feeds aren't available for actual searches, i.e. typing in the search box on Google. You'd have to do it like this.
(PS: Credit goes to the question itself. It would not have occurred to me otherwise.)
Try adding
&output=rss
https://news.google.com/news/section?cf=all&ned=us&q=education**&output=rss**
The custom RSS feed is in this format:
https://news.google.com/news/feeds?q={yourquery}&output=rss.
For example, https://news.google.com/news/feeds?q=developer&output=rss returns news about developer.
Your best bet is somthing like Google Alerts feeds. You can type a query select the type of data in there and get it delivered via RSS. Since they support PubSubHubbub for that, you will also get results in realtime.
If you want another dataset feel free to also check Superfeedr's track feeds which will help you get notified in realtime when keywords are matched across any RSS feed.
I think Google disabled the RSS search output in the past few weeks, and I have not found an alternative. The XML output requires a Google paid account. I now have to scrape the HTML for what I want.
Here's the new way to access Google News RSS feeds:
https://news.google.com/news/rss/search/section/q/{yourquery}
Any simple code snipped to GET the number of subscribers to any feed URL?
Thanks!
First off, I'll start by saying there is no easy way to do this. You, however, do have several options.
Option 1: Use feedburner. These statistics are not 100% correct, but its by far the least painful method, but you can only use it for future and not backwards to see how many people are already subscribed.
Option 2: Use Google Webmaster to calculate the number of subscribers.
Option 3: I found this perl script on rsslib.com that parses your server logs to figure out the number of subscribers
When you are using services like Feedburner, you can easily see the number of subscribers. If you are simply hosting the RSS feed yourself it will be pretty hard to find out returning visitors - you would need to include some kind of token identifying each user and match it to your server records.
I'd say you should use something like Feedburner and you are good to go.
When I create entries for my RSS feed should I include a full history or just partial?
How many should I go back?
Do rss readers remember entries in the past (before cutoff) if I make it a partial feed?
Thank,
Kevin
Obviously it's impractical to keep a full history in your RSS feed if you have a frequently updated site. Sites like the BBC would end up with RSS feeds several MB long if that were the case.
I generally limit my feed to the last 30-40 posts—people use feeds to stay up to date with the latest news/announcements from a site, so they really don't need to see feed items from 2 months ago. But sites like BBC news seem to maintain feeds around 80 items long.
And I don't think most readers remember past entries. It's sort of assumed that old entries will eventually fall off the feed as new items are added. RSS is for syndication not archiving.
How would I get the next page or more results for a feed?
For example, when I go to Security Now feed page, there is no "next" link of any kind and the url parameter of "page=100" does nothing:
http://leoville.tv/podcasts/sn.xml
I get only 1 page of results of about 20 episodes. However my Google Reader can successfully retrieve episodes that are earlier than that.
Indeed it is true that Google Reader caches the items and it is NOT possible to paginate on RSS2, RSS or Atom feeds (unless they have rel=next link, which none of them seem to have).
However, we can leverage the existing Google Reader infrastructure, with some work, to retrieve a list of, say 200 items!
Given the above podcast url we retrieve the latest 200 episodes by:
Using the ...google.ca/reader/atom/feed prefix instead of the usual view/feed as can be seen in your google reader.
Appending n=200 as the query parameter.
So we have:
http://www.google.ca/reader/atom/feed/http://leoville.tv/podcasts/sn.xml?hl=en&n=200
There is a very insightful reverse-engineered google-reader API project located at http://code.google.com/p/pyrfeed/wiki/GoogleReaderAPI
Google reader caches RSS entries. You can't get any more from the actual feed if they don't allow for it.