Created
February 2, 2013 13:22
-
-
Save ollieglass/4697350 to your computer and use it in GitHub Desktop.
Open Topsy reports for your last ten Wordpress blog posts. Details at http://ollieglass.com/2013/02/01/topsy-tracker-whos-tweeting-about-your-blog-posts/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import webbrowser | |
import xmlrpclib | |
# get posts from wordpress | |
server = xmlrpclib.ServerProxy('http://ollieglass.com/xmlrpc.php') | |
result = server.metaWeblog.getRecentPosts('WORDPRESS_BLOG_NAME', 'WORDPRESS_USERNAME', 'WORDPRESS_PASSWORD', 10) | |
urls = [post['link'] for post in result] | |
# change into topsy searches | |
urls = [url.replace('http://', 'http://topsy.com/') for url in urls] | |
# open all in browser | |
for url in urls: | |
webbrowser.open(url) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment