Einar Egilsson

Export Haloscan comments

Posted: Last updated:

UPDATE 2012-04-23: Haloscan went out of business years ago. I just keep this entry around for historical reasons.

A few weeks ago I was helping my sister change her blog. She has a Blogger account but uses Haloscan for comments, since when she started blogging Blogger didn't offer comments as a part of their service. That has changed now, so I thought it would be much more convenient to have the comments and blog all at the same place. I just needed a way to export her Haloscan comments and import them into Blogger. So I wrote a small Python script to do the exporting for me.

The script logs into your Haloscan account, makes a http request for each comment and writes them to an .xml file. If the script fails halfway through you can just start it again and it will continue where it left off. A xml file with the name yourusername.xml will be created in your working folder where you start the script. It contains all information about every comment, date, author, url, email, ip, threadid, commentid and text. You can then parse the xml file to import them into other comment systems. Before you download the script, be sure to read the following disclaimer:

DISCLAIMER: This is provided "AS-IS", I make no guarantees that this works, it's based on screen scraping so could stop working whenever Haloscan change their pages.

According to the Haloscan Terms of Service (http://www.haloscan.com/privacy/) it's not explicitly forbidden to screen scrape their site. HOWEVER, they say:

"We reserve the right to suspend, delete, or cancel any account/service at any time for any reason."

This script makes a new http request for every single comment so if you have thousands of comments and Haloscan doesn't approve of you pounding their server and suspends your account and you lose all your comments, I CANNOT BE HELD RESPONSIBLE. USE AT YOUR OWN RISK! You've been warned!

Now that you've read that, you can download the script here.


If you read this far you should probably follow me on Twitter or check out my other blog posts. I no longer have comments on this blog, but you can send me an email if you have some comments about this page.