After a few months of blogging photos from my life events, I realised that I should have kept a local version (dummy me). I kept everything else, so why did I forget this time?! Anyways, I realised that this is not an easy job if you are free hosting on Wordpress.com. All I could have is either an XML with posts and references to images, or a full migration to another Wordpress blog. So I rolled up my sleeves and reused a python script I used before. Here is the script: #!/usr/bin/python # -*- coding: utf-8 -*- # This script parses a wordpress backup XML and downloads the contained media files. # Example: # python wordpress-media-downloader.py /Users/madly/Downloads/mycoolblog.wordpress.2016-05-02.xml /Users/madly/Downloads/media-library import sys import urllib2 import re # # Takes a url and a directory for saving the file. Directory must exist. # def download(url, dir_name): file_name = url.split('/')[-1] u = urllib2.urlopen(url) f = open(dir_name+'/...
Sharing my experience from trials and troubles.