18

2009-01-29: Due to website changes these pipes no longer work. Check out https://stackoverflow.com/users/recent/{user-id} (or write a pipe for it).


Thanks to Beau Simensen's answer I've fixed the Yahoo! pipe. Please feel free to use it. http://pipes.yahoo.com/lanzkron/stackoverflow_responses

Sam Hasler cloned his own version that adds commented: or answered: to the title. (I'm not updating mine since it'll flood current subscribers with all the items again.)

It seems to work OK now. If you have enhancement requests or comments, please leave your comments here and I should by magically notified by RSS...


(original question follows)


Following a question about how to be notified about responses to post I started writing a Yahoo! pipe to scrape the responses tab of the profile page (https://stackoverflow.com/users/<so-id>?sort=responses).

Sadly, getting pipes' regex to do what I thought it should do proved harder than I first anticipated.

Happily my wife gave birth last week.

Sadly this cut into the spare time I had to fool around on non-work/family related stuff.

So if you have the time please let me know how to fix my pipe. At the moment it has the following issues:

  • None of the regular expressions work (even though they do on REGex TESTER)
    • title: Contents of second link (^.*?</a>(.*?</a>).*)
    • link: Second HREF (.*?href="[^"]*".*href="?([^"]*)".*)
    • author: Text of first link (^[^>]*>([^<]*)</a.*)
  • New items will appear several times since the time of the response changes (from yesterday to 2 days ago, etc.). I think this is related to the title issue, but I'm not sure.

Also, this is the first time I'm creating an RSS feed, so I may be missing some other obvious stuff. If so, please let me know, and I'll add it.

7
  • The pipe linked to at the top of the question doesn't work, is it supposed to?
    – Sam Hasler
    Commented Jan 7, 2009 at 22:57
  • Sam, the link at the top of the page works for me what seems to be the problem?
    – Motti
    Commented Jan 8, 2009 at 8:06
  • the link works, but the pipe doesn't produce the same feed as Beau's when I clone it. I was expecting it to be fixed with Beau's changes.
    – Sam Hasler
    Commented Jan 8, 2009 at 12:13
  • The recent tab was replaced by stackoverflow.com/users/recent{your-user-id}. But it neither has a feed nor a Yahoo! Pipe. Who will create one for us?
    – Jader Dias
    Commented Jan 28, 2009 at 15:46
  • I don't think anyone can write a pipe for it, you can only see your own recent page thus the pipe will not have access to your data :o(
    – Motti
    Commented Jan 29, 2009 at 12:44
  • someone can create an application that with your password can get the cookies that enables it to fetch the data periodically.
    – Jader Dias
    Commented Feb 6, 2009 at 12:25
  • As Jeff mentioned in the SO blog, closing a question is effectively nominating it for deletion. There's no way this question should ever be deleted. Commented Feb 16, 2009 at 21:19

4 Answers 4

7

I took a swing at this. I never used Yahoo! Pipes before, so it was a bit of a bear. I cloned your Pipe and updated it. You can take a look my pipe here.

  • title: (?s).*?<a.*?<a.+?>([^<]+).*
  • author: (?s).*?<a([^>]+)>([^<]+?)</a>.*
  • link: (?s).*?<a.*?<a.*?href="([^"]*).*
  • description: (?s).*?<a.*?<a.+?>([^<]+).*?<p>(.+?)</p>

Replace with $1 for title, $2 for author, $1 for link and $2 for description.

I got a pointer from this page, stating that some of the checkboxes do not work correctly. I had the "s" checked initially, but it only seemed to work half the time, so things seemed very inconsistent.

From the link posted above:

Somehow the case-insensitive checkbox seems broken. Luckily you can substitute with (?i), which works nicely.

So I tried to do the same with s to see if it worked like i, and sure enough. Honestly, I don't know this syntax very well (never seen it before), but it works so I was happy enough with that!

2
  • What are the (?s) at the start doing?
    – Sam Hasler
    Commented Jan 7, 2009 at 13:04
  • Updated my answer with more details on the (?s) thing, but essentially it is just forcing the same functionality as the s checkbox. I will have to look this up in more detail sometime.
    – Beau Simensen
    Commented Jan 7, 2009 at 18:47
4

I have come up with a very clean solution for this that uses the API.

Here is the feed:

http://quickmediasolutions.com/stack2rss/{sites}/users/{ID}/mentioned

Example of all recent comments made to Jeff Atwood on Stack Overflow:

http://quickmediasolutions.com/stack2rss/stackoverflow/users/1/mentioned

2
  • 1
    Link is 404. Any chance for an update? Commented Jul 23, 2015 at 12:40
  • The link is broken: "Not Found. The requested resource was not found on this server." Commented Dec 28, 2022 at 12:14
1

Native RSS feed for responses

Combine user feed with /responses

For example:

  • https://meta.stackexchange.com/feeds/user/your-user-id/responses
  • https://stackoverflow.com/feeds/user/your-user-id/responses

To get the user feed for any domain:

  1. Go to your account profile
  2. Check for "user feed" at the bottom
  3. add /responses to the URL
1

I wanted to know whether items were comments or answers, so I altered my own clone of the pipe

In        item.title  
replace   (?s).*?<a.*?<(?:b|span[^>]+)>(comment|answer)(?:ed on|ed)?<.(?:b|span)>\s<a.+?>([^<]+).*  
with      $1: $2

This gives me titles like this:

comment: Responses RSS Feed?
comment: Responses RSS Feed?
answer: RSS feed for responses to your Stack Overflow posts
comment: What are the disadvantages of arrays?
answer: Comparing cold-start to warm start
answer: Where do Java and .NET string literals reside?

Update: I filed a UserVoice request yesterday to have direct link to comments on recent, responses, and user feed which is currently under review and would make it much easier go to comments when they appear in the feed if it is implemented.

0

You must log in to answer this question.

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