2016 Update: Yahoo Pipes is dead and IFTTT now supports a Reddit channel, which allows you to duplicate this functionality.
TL;DR: Use this IFTTT recipe, and change the subreddit value in the parameter of the Feed URL as needed.
In a previous post, I joked about a hypothetical social media strategy in which an automated script does Facebook brand management by stealing the top cute images from Reddit - an aggregator of trending topics and images - and reposting them on the Facebook page, additionally adding a cute message encouraging users to LIKE, SHARE, and COMMENT! We get easy social media fame for no monetary cost.
Out of curiosity, I wanted to see if it was feasible to create such a script. Both Reddit and Facebook indeed have APIs that make it easy. But then I have to set up a server to check Reddit periodically, ensure that no images are duplicated, etc., and that can take time to implement and ensure that it works correctly (all the images must be cute!). I looked into IFTTT, a relatively new startup that talks between different popular web services to automate simple tasks, like posting to Twitter whenever you post to Facebook.
As it turns out, yes, this is possible, and you can also save the top images on Reddit to your computer via any cloud storage service without ever visiting the website too! Just use this IFTTT recipe! There are a few interesting caveats, though…
Really Simple Syndication is…Really Simple?
IFTTT allows users to extract information from RSS feeds, which one might typically be used to read blogs and news articles. The RSS feed typically provides the title, author, date, and content of a post: the important things. However, RSS has more applications: it can distribute other data, such as weather and desktop wallpapers. IFTTT allows other apps to load image and audio files from an RSS feed, but only if the RSS feed link links to the content itself.
Unfortunately, this won’t work on Reddit by default, as its RSS feeds do not contain a direct link to the photo and instead link to the Reddit comments on the image. Image-based websites, such as BuzzFeed and InterfaceLift also implement a similar system because they don’t want their users just to use a script to download images and bypass the website and its lovely revenue-generating advertisements. Therefore, the RSS feed alone won’t work with IFTTT.
During my research into my social media exploitation hypothesis, I found a blog post by Steve Mould that provides a way to translate data from Reddit’s JSON API to an RSS feed using a service called Yahoo Pipes. This modified RSS feed, when given a subreddit and a score threshold, obtains the top Reddit posts in that subreddit above that karma threshold (upvotes - downvotes), and returns a feed item which contains direct link to the referenced URL.
Here is my variation of his Reddit Pipe. My script to process the API has a few changes (such as using Reddit’s “hot” posts, instead of the top posts; hot posts update much more frequently). Testing it with r/aww and a threshold of 50 karma, I received 177 very cute pictures on my computer in a week.
From that Pipe, you can get the data in a RSS feed URL. Right-click and copy that feed URL into a IFTTT recipe as the source. For the action, use the **** variable to retrieve the image URL.
With Great Power Comes Great Cuteness
Thanks to IFTTT, there are many other creative things you can do with the feed that you can include in a recipe:
- Auto-post the image to your Tumblr or WordPress blog. Easy cuteness, and you’ll be the source!
- Auto-curate the cute photos to your Facebook or Twitter account. All your friends will love you!
- Get social media fame for no additional monetary cost by publishing the cute images to your Facebook Page, with an encouragement to LIKE SHARE and COMMENT! My original hypothesis was correct!
One caveat in using Yahoo Pipes is that it is rate limited to 200 runs in a 10 minute interval, meaning that the IFTTT recipe provided will likely fail if more than 200 people use the feed. If that does happen, just clone my pipe, and use the RSS feed from the clone for your own personal recipe.
Also, there’s no rate limiting on when recipes are triggered and images are posted/downloaded. You can trigger multiple images simultaneously, which may be considered spammy if you are posting to social media. In that case, increase the karma threshold to reduce the frequency of the postings and to maintain a high quality of the images.
Getting socially-vetted photos on your computer without any effort is a useful timesaver. A solution to a first world problem, perhaps, but it’s the little things that count!
I am currently looking for a job in data analysis/software engineering in San Francisco. If you liked this post and have a lead, feel free to shoot me an email.
Since I currently do not have a full-time salary to subsidize my machine learning/deep learning/software/hardware needs for these blog posts, I have set up a Patreon, and any monetary contributions to the Patreon are appreciated and will be put to good creative use.