1

I can easily get the feeds of stackoverflow like this

http://stack2rss.stackexchange.com/stackoverflow/answers

But I can't feeds of bicycles in the same way WHY?

http://stack2rss.stackexchange.com/bicycles/answers

2 Answers 2

3

You need to append .stackexchange.com to the site name:

http://stack2rss.stackexchange.com/bicycles.stackexchange.com/answers


Edit: here is the relevant section of Stack2RSS's source code that constructs the API URL to query based on the site parameter you supply:

src/feed.php (I've highlighted the relevant lines in bold):

  // Make sure the site has a TLD domain in it (for backward compatibility,
  // we insert '.com' if there isn't one. Also modify the $_GET variable to include it.
  if(substr($site, -4) != '.com')
  {
      $site .= '.com';
      $_GET['site'] .= '.com';
  }

  // Unless the site is stackauth, we prepend 'api.' to the URL
  $prepend = ($site == 'stackauth.com')?'':'api.';

  // Now construct the URL to return
  return "http://{$prepend}{$site}/{$version}/{$method}?" . implode('&', $parameters);

So basically what's happening here is that Stack2RSS first checks the site parameter you supply to see if it ends in .com (there are currently no Stack Exchange sites that end in any other TLD). So, both of the following URLs are identical and will produce the same results:

http://stack2rss.stackexchange.com/bicycles.stackexchange/answers
http://stack2rss.stackexchange.com/bicycles.stackexchange.com/answers

The .com is optional - the important part is that the .stackexchange portion of the domain name is there, since Stack2RSS can figure the rest out from there.

2
  • Do you know why this site requires the full URL while StackOverflow, ServerFault and others don't?
    – Gary.Ray Mod
    Oct 19, 2012 at 19:18
  • @Gary.Ray: I've added a detailed explanation of the problem and what causes it. Oct 20, 2012 at 4:42
1

I'm not sure why, but that service seems to only work with the more high-traffic portions of stackexchange:

  • StackOverflow - works
  • ServerFault - works
  • SuperUser - works

  • Bicycles - does not work

  • English - does not work
  • Programmers - does not work
  • Webmasters - does not work

I'll ask over on WebApps and see if anyone knows.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .