Here you are reddit: a bot to post imgur caches of craigslist posts - it's called ric
I noticed that a lot of craigslist.org posts have cached images in case the page gets pulled and for redditors who work somehwere craigslist is blocked. So I wrote a quick script which I'm running on a server to post an imgur link every time it finds a craigslist post. The tool is in python, is GPL'd and the code is available here:
Obviously you shouldn't run it as it is because I'm already doing that (you can run it in demo mode to just generate the images without posting comments) but the code might be useful for similar tools. Improvements are very welcome, as the license implies.
It has three parts which you can use in your own projects:
- a bit of an imgur api lib (just for uploading images - needs a lot more functionality adding)
- a bit of a reddit api (posting comments and stories, searching stories)
- a webpage renderer based on WebKit.
I only spent a couple of nights on it but some improvements might be:
- check if the page has no images and post a text cache instead
- check if there is already a cache link and not post again
- extend the sites cached (it doesn't cover Canadian craigslist for example) and restrict others (forums and bestof)
Other feature suggestions are welcome. Enjoy!
EDIT: Corrections in italics
Posted Dec 9, 2009, 6:12 PM UTC · edited
http://garyshood.com/craigslist/mirror.phps
my version. grabs text from craigslist, posts it back on reddit. look at process_post for the regex for grabbing from craigslist.
Sounds useful but the link doesn't work
oh whoops. sorry about that, check again.