Cатсн²² (in)sесuяitу / ChrisJohnRiley

Because we're damned if we do, and we're damned if we don't!

Tag Archives: Yahoo Pipes

{Quick Post} Adding rand() to Yahoo Pipes

This is just a quick post (and not particularly security orientated) about some modifications I made to the patched together Tumblr –> Yahoo Pipes –> FeedBurner solution I use for the Suggested Reading links I post on twitter (and make available through feed.c22.cc).

The problem:

I’ve begun to notice that any blogpost or articles I share recently are turning up on Twitter (the ones with the dreaded [SuggestedReading] tag) about 6 hours after I actually share them. This doesn’t make for a very reliable sharing system as people in InfoSec tend to want up-to-date information, not day old data clogging their time lines.

The thought process:

Originally I thought this was a problem with feedburner as it was the last item in the chain and I know it doesn’t update realtime. The feedburner section of the process adds items to the twitter stream with the prefix [SuggestedReading]. As it turns out this didn’t seem to be the cause of the problems, as even a forced refresh wasn’t doing the trick. Following it back through to Yahoo Pipes I saw that the feed.c22.cc/rss feed was loading, but always responding with what seems to be a cached version.

The fix:

The fix I implemented was to add a ever changing string to the end of the Yahoo Pipes “fetch feed” to prevent the caching issue.

Instead of requesting feed.c22.cc/rss it would request feed.c22.cc/rss?timestamp=1338531580

As Yahoo Pipes doesn’t offer a rand() function, I implemented a series of pipes that take the current date/time, transform it into a string (e.g. 1338541580) and then add it to the end of the static URL using the Yahoo Pipes URL builder function.

You can view the Yahoo pipe here