{"id":519,"date":"2007-05-21T12:06:09","date_gmt":"2007-05-21T04:06:09","guid":{"rendered":"http:\/\/blog.broom9.com\/?page_id=519"},"modified":"2010-10-09T23:19:50","modified_gmt":"2010-10-09T15:19:50","slug":"live-space-mover","status":"publish","type":"page","link":"https:\/\/b2.broom9.com\/?page_id=519","title":{"rendered":"Live Space Mover"},"content":{"rendered":"<p><strong>As Microsoft has announced Live Space to WordPress.com migration, the recommended way now is to use the official function. If you want to move Live Space to a self-hosted WordPress, create a blog on WordPress.com as a bridge (export from WordPress.com blog then import to your self-hosted WordPress).<\/strong><\/p>\n<p><strong>Thank all guys who cared about this script ;)<\/strong><\/p>\n<p>A python script for importing blog entries from live space to WordPress.<\/p>\n<p>With <a href=\"http:\/\/code.google.com\/p\/google-blog-converters-appengine\/\">Google blog converter<\/a> you may also be able to move from live space to blogger\/TypePad\/Moveable Type\/Live Journal blog. (See <a href=\"#note2\">note 2<\/a> if you want to use this script with Google blog converter).<\/p>\n<p>Tested on Python 2.5\/2.6 and Windows XP\/Ubuntu Linux.<\/p>\n<p>Based on the wonderful HTML parser library <a href=\"http:\/\/www.crummy.com\/software\/BeautifulSoup\/\">BeautifulSoup<\/a>.<\/p>\n<p>Hosted on <a title=\"Project home\" href=\"http:\/\/code.google.com\/p\/live-space-mover\/\">Google Code<\/a>, Source code svn is<\/p>\n<blockquote><p>svn checkout http:\/\/live-space-mover.googlecode.com\/svn\/trunk\/ live-space-mover<\/p><\/blockquote>\n<p>If there are any problems when using this script, feel free to contact me.  <img decoding=\"async\" src=\"\/weiwei9.png\" alt=\"weiwei9 AT gmail dot com\" \/><br \/>\n<a name=\"donate\"><\/a><\/p>\n<form style=\"height: 26px;\" action=\"https:\/\/www.paypal.com\/cgi-bin\/webscr\" method=\"post\"> <input name=\"cmd\" type=\"hidden\" value=\"_s-xclick\" \/> <input style=\"padding: 0px; border: 0px; margin: 0px;\" alt=\"PayPal - The safer, easier way to pay online!\" name=\"submit\" src=\"https:\/\/www.paypal.com\/en_US\/i\/btn\/btn_donate_LG.gif\" type=\"image\" \/> <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.paypal.com\/en_US\/i\/scr\/pixel.gif\" border=\"0\" alt=\"\" width=\"1\" height=\"1\" \/><\/p>\n<p><input name=\"encrypted\" type=\"hidden\" value=\"-----BEGIN PKCS7-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYCG\/UVECiUrCjHEwll7bUgTeyPf\/hOWXos4+P4SU8fuVuNwfyZTp9kJrvdrdg0fH4nYC5MJ5pbaRDfb246udRX+H4zU1BhPpeKhgqYrbO6\/Mj7ijCNtTh0+TW99oEekXtaGmNNuFgZEpTLL3G6jgQBzU\/EGTxso5fKuyS5C7WFQ9jELMAkGBSsOAwIaBQAwgcQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQINyq9EFbBXjuAgaD3nILtvupMOJBIguBNzzgLB442jrTl+iX6FMiNAl5j8mJ+Mx5xzoeCY2QzuCjAGe\/1x3DqAeCxJQXdbSoQL1+S0XDDy+X14Ca42Nz7krt0eGblWsSBh5kGHU0mIsIcaEwAjiPWfOSnp2zs5aN6ObuLf47HDc4RYq5DPTtS0F4kdzKxbMI+IOnfG1vuh0+bE4SX3FB7X1XyIXS0vPJ81RfRoIIDhzCCA4MwggLsoAMCAQICAQAwDQYJKoZIhvcNAQEFBQAwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4x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\/cCMn5hzGCAZowggGWAgEBMIGUMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMDgwNzE0MDgwNDQ1WjAjBgkqhkiG9w0BCQQxFgQU0LUTiVPVOKWgDmM\/\/bd8ez8Tz7QwDQYJKoZIhvcNAQEBBQAEgYBwUNw75pSAMjsR7w1O6uijTeAEFVQnLRRY\/bAhYBy7bLigwdNwjMYMgZaaudK\/BgOJS2b6TuHLIxSrkcl3ROIV\/Q9XG3z4kQ7MOcv3mIXPgcDTp1Jr9Y0KrSVPyPM4nEKLMuZqAQ88DMWpJrpUPnUPaQ4ldYobJ8MZv53WKOzq0g==-----END PKCS7-----\" \/> <\/form>\n<h4>User Guide<\/h4>\n<ol>\n<li>Install <a href=\"http:\/\/python.org\/download\/\">Python runtime<\/a> and Beautiful Soup. There are 2 combinations tested by me:\n<ol>\n<li>Python Runtime 2.5.2 and <a href=\"http:\/\/www.crummy.com\/software\/BeautifulSoup\/download\/3.x\/BeautifulSoup-3.0.6.tar.gz\">Beautiful Soup 3.0.6<\/a><\/li>\n<li>Python Runtime 2.5.1 and <a href=\"http:\/\/www.crummy.com\/software\/BeautifulSoup\/download\/3.x\/BeautifulSoup-3.0.4.py\">Beautiful Soup 3.0.4<\/a> and a small fix in <a href=\"\/?page_id=519#note1\">note 1<\/a><\/li>\n<\/ol>\n<p>Place the file BeautifulSoup.py in the same directory of live-space-mover.py, or install it into Python runtime by yourself<\/li>\n<li>Download the newest release zip from <a title=\"hosted on google code\" href=\"http:\/\/code.google.com\/p\/live-space-mover\/\">the hosted page<\/a>, extract it. (Older versions may become unusable because of the HTML changes of Live Space).<a href=\"http:\/\/live-space-mover.googlecode.com\/files\/live-space-mover.py\"> <\/a><\/li>\n<li>Change your live space settings\n<ol>\n<li>Make sure it is open to anyone (not only to your contacts)<\/li>\n<li>Set time zone to the same with your wordpress blog<\/li>\n<li>Set date format to yyyy\/mm\/dd, or mm\/dd\/yyyy. This probably depends on the locale setting of your system or browser, the point is to make the &#8220;YEAR&#8221; appear in your date. If the program fails and complains about date parsing, try to use the option -t to specify date time format. For example, the time on my space is shown like &#8220;9:45 PM&#8221;, but if your time is shown like &#8220;9:45:15 PM&#8221;, you may want to use a command line like below<br \/>\n<blockquote><p><code> python live-space-mover.py -s http:\/\/yourspaceid.spaces.live.com\/ -t \"%m\/%d\/%Y %I:%M:%S %p\"<br \/>\n<\/code><\/p><\/blockquote>\n<p>An introduction for the time format parameters are available <a title=\"Doc of strftime in Python\" href=\"http:\/\/docs.python.org\/lib\/module-time.html\">here<\/a>.<\/li>\n<li>Set &#8220;Blog entry date display&#8221; to &#8220;Show the blog entry date in the header\u201d<\/li>\n<li>From some users&#8217; feedback, I noticed themes of live space differ slightly in structure, which may lead to failure of this program. So please change your live space theme to &#8220;Journey&#8221; (the same as <a href=\"http:\/\/broom9.spaces.live.com\">my experiment space<\/a>).<\/li>\n<\/ol>\n<\/li>\n<li>Run the live-space-mover.py script. In Windows, open the command line (win+R, enter &#8220;cmd&#8221; and return), change to the directory (use &#8220;c:&#8221;\/&#8221;d:&#8221; to change disk, use  &#8220;cd&#8221; command to change directory, please google it for help if need) of live-space-mover.py, run command like this<br \/>\n<code><br \/>\npython live-space-mover.py -s http:\/\/yourspaceid.spaces.live.com\/<br \/>\n<\/code><br \/>\nReplace the example parameter with your own. This will generate an XML file named &#8220;export_xxxxx.xml&#8221; in the same directory of this script, which is in WordPress export file format.<\/li>\n<li>Use the import function in WordPress to import the XML file generated in the last step, remember to choose &#8220;WordPress&#8221; type in the import page, rather than &#8220;LiveJournal&#8221; or something else.<\/li>\n<\/ol>\n<h4>Notes<\/h4>\n<ul>\n<li><strong>A known limitation: can&#8217;t fetch comments after the first page!<\/strong><\/li>\n<li><a name=\"note1\"><\/a>If you met an &#8220;UnicodeDecodeError&#8221;, that&#8217;s probably because your live space contains Italian or other languages. There is a bug in Python 2.5, you need to fix it. Yes, fix Python library by your own hands :P<br \/>\nIf you installed Python to it&#8217;s default path on Windows, what you need to do is to change the file C:\\Python25\\Lib\\sgmlib.py, in line 394<br \/>\n<code>if not 0 &lt;= n &lt;= 255:<\/code><br \/>\nshould be changed to<br \/>\n<code>if not 0 &lt;= n &lt;= 127:<\/code><br \/>\nThat&#8217;s all, I learned this from <a title=\"Python unicode bug\" href=\"http:\/\/mail.python.org\/pipermail\/python-bugs-list\/2007-February\/037082.html\">here<\/a><\/li>\n<li><a name=\"note2\"><\/a>If you want to use Google blog converter with this script, the recommended way is to open a new blog on WordPress.com or any other wordpress powered BSP, import the XML generated by this script and export a new XML with the built-in exporting function of WordPress, then feed Google blog converter with this new XML, because I can&#8217;t make sure XML exported by this script will meet Google blog converter&#8217;s requirement. Another thing to remember is you should change timezone of every place to UTC, including live space, wordpress blog, and the machine used to run this script. Thank <a href=\"http:\/\/xiangningliu.blogspot.com\/\">1nm<\/a> for sharing experiences about Google blog converter.<\/li>\n<li>This mover heavily depends on some very weird and sucking patterns of HTML and JavaScript codes in live space. So it may become unusable at any time&#8230;.in that case please inform me<\/li>\n<li><span style=\"text-decoration: line-through;\">As I studied, the metaWeblog API in WordPress seems not to support comments? WordPress supports other two kinds of XML-RPC interfaces, too, blogger and MovableType. The blogger API has been updated to GData, and the old API looks not supporting comments, too. The documentation of MovableType API is so complex&#8230;.I can&#8217;t understand yet.So maybe it would be much easier to write a mover with PHP which can handle comments.<\/span><\/li>\n<li> This script may generate log file and cache file in the working directory. If you met some errors, it would be very helpful to send the log file and error message to me. Thank you.<\/li>\n<li>You can use command<br \/>\n<code><br \/>\npython live-space-mover.py -help<br \/>\n<\/code><br \/>\nto check other options of this script<\/li>\n<li>Since version 1.0, the suggested usage method is to export an xml file then import it. The directly posting method with MetaWeblog interface has been deprecated but left in the release package for anybody&#8217;s needs.<\/li>\n<\/ul>\n<h4>Change Log<\/h4>\n<p>* Version 1.8<br \/>\n&#8211; CHG: Catch up with changes of live space<\/p>\n<p>* Version 1.7.6<br \/>\n&#8211; CHG: Modify exported date format to be compatible with WordPress2Blogger converter.<\/p>\n<p>* Version 1.7.5<br \/>\n&#8211; BUG: Handled the weird format of comment date box<\/p>\n<p>* Version 1.7.4<br \/>\n&#8211; BUG: Fixed the comments order problem reported by Sun Yue<\/p>\n<p>* Version 1.7.3<br \/>\n&#8211; BUG: Fixed the problem when comment author name contains emoticons<\/p>\n<p>* Version 1.7.2<br \/>\n&#8211; BUG: Fixed the pubDate of post item for WP 2.7<\/p>\n<p>* Version 1.7.1<br \/>\n&#8211; BUG: Fixed the comment author missing<\/p>\n<p>* Version 1.7<br \/>\n&#8211; CHG: Catch up with changes of live space in Dec 2008<\/p>\n<p>* Version 1.6<br \/>\n&#8211; CHG: Catch up with changes of Live Space<br \/>\n&#8211; BUG: Fix the bug &#8220;can&#8217;t scan domain name with hyphen when comments are more than 20&#8221;<\/p>\n<p>* Version 1.5<br \/>\n&#8211; CHG: Catch up with changes of Live Space<br \/>\n&#8211; BUG: Escaped special chars for XML<br \/>\n&#8211; NEW: Improved error logging when parsing error<\/p>\n<p>* Version 1.4<br \/>\n&#8211; BUG: Converted unicode numbers (in category name, entry title and comment author) to unicode string. The bug of duplicate categories in WP 2.3 was solved by this.<\/p>\n<p>* Version 1.3<br \/>\n&#8211; NEW: Support category exporting by setting header field &#8216;User-Agent&#8217; to Firefox<\/p>\n<p>* Version 1.2<br \/>\n&#8211; Catch up with some changes of live space<\/p>\n<p>* Version 1.1<br \/>\n&#8211; BUG: Error when title is empty<br \/>\n&#8211; NEW: Add cache and resume ability<\/p>\n<p>* Version 1.0<br \/>\n&#8211; Use XML file and import function of WordPress, instead of MetaWeblog and post<br \/>\n&#8211; Change some fetching codes according to the code changes of live space<br \/>\n&#8211; Fixed a bug of extracting email address of comment author<\/p>\n<p>* Version 0.93<br \/>\n&#8211; Add Donate Link<\/p>\n<p>* Version 0.92<br \/>\n&#8211; Fix some bugs<\/p>\n<p>* Version 0.9<br \/>\n&#8211; NEW: Support moving comments. Add file &#8220;my-wp-comments-post.php&#8221; for posting comments<br \/>\n&#8211; NEW: Add running modes, for only moving posts\/comments, or both<\/p>\n<p>* Version 0.2<br \/>\n&#8211; BUG: Error when reading live space in Italian or other languages. Actually it&#8217;s a bug of Python 2.5.<br \/>\n&#8211; BUG: Doesn&#8217;t jump out loop after moving the oldest entry.<br \/>\n&#8211; NEW: Support date format pattern specifying, added -t option<br \/>\n&#8211; NEW: Support starting from a specified entry, added -f option<\/p>\n<p>* Version 0.1<br \/>\n&#8211; NEW: Starting, used to move my own live space<\/p>\n<h4>Thanks<\/h4>\n<p>Great Thanks for <a title=\"His blog\" href=\"http:\/\/www.ilparticolarenascosto.it\/\">Michele Nasti<\/a> and <a title=\"I guess this is his...or his girlfriend's blog\" href=\"http:\/\/saoblog.laventanadesaouri.com\/\">Oliver Diaz Herrera<\/a>, they used this script, reported bugs to me and helped me to solve them. I&#8217;m not a patient guy and I don&#8217;t have many blogs to test this script too much. It&#8217;s them, the nice users, who made this script really usable.<\/p>\n<p>It\u2019s so wonderful to cooperate with guys all around the world ;-p<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As Microsoft has announced Live Space to WordPress.com migration, the recommended way now is to use the official function. If you want to move Live Space to a self-hosted WordPress, create a blog on WordPress.com as a bridge (export from WordPress.com blog then import to your self-hosted WordPress). Thank all guys who cared about this&hellip; <a class=\"more-link\" href=\"https:\/\/b2.broom9.com\/?page_id=519\">Continue reading <span class=\"screen-reader-text\">Live Space Mover<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"jetpack_post_was_ever_published":false,"footnotes":""},"class_list":["post-519","page","type-page","status-publish","hentry","entry"],"jetpack_shortlink":"https:\/\/wp.me\/P1Q1al-8n","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/b2.broom9.com\/index.php?rest_route=\/wp\/v2\/pages\/519","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/b2.broom9.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/b2.broom9.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/b2.broom9.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/b2.broom9.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=519"}],"version-history":[{"count":0,"href":"https:\/\/b2.broom9.com\/index.php?rest_route=\/wp\/v2\/pages\/519\/revisions"}],"wp:attachment":[{"href":"https:\/\/b2.broom9.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}