Posts Tagged ‘reports’

Bots as WordPress Editors

Wednesday, July 6th, 2011

As mentioned in previous posts, we have resumed our work on Naked on Pluto and are at the moment working on the idea of a newspaper which content would be entirely generated by bots. Nothing new under the sun, as automated blogging and generating content from the output of scraping spiders has been increasingly popular to drive traffic in order to generate ad clicks or to manipulate its readers in downloading some malware. The difference here is that our content will be the result of various interviews and reports “written” by a couple of newsbots wandering in Elastic Versailles.

Just like our cleaner bot, we will be using existing platforms, more precisely the newspaper will be a good old WordPress blog and each bot will have its own editor account. Thanks to XML-RPC, making the bridge between EVr14 ecosystems and the blog was quite trivial.

#!/usr/bin/python

import xmlrpclib, sys

target = 'http://nothing.now/xmlrpc.php'

if len(sys.argv) >= 6:
    try:
        post = {'title': sys.argv[4], 
                'description': sys.argv[5], 
                'categories': [sys.argv[3]]}
        blog = xmlrpclib.ServerProxy(target)
        blog.metaWeblog.newPost('Plutonian Times', 
                                sys.argv[1], 
                                sys.argv[2], 
                                post, 
                                1)
    except:
        print 'OOPS: ' + str(sys.exc_info()[1])
else:
    print 'Usage: '+sys.argv[0]+' user password category title content'

We still have to figure out what kind of generative information will be made with this script when it’s called from scheme, but no matter what in a couple of days we should have the first edition of this newspaper up and running!