Medium allows you to download your story archive, but that archive doesn’t contain your images. Ergo, it is not really an archive.
This script:
- downloads all the images from your medium articles locally
- rewrites the archive files so that they point to the local images
(I wrote a similar script for a Twitter archive.)
- n+1 backups is better than n backups.
- Your own backup will make it possible to get to your data if you’re offline, or if Medium happens to be down.
- Someone can hack into your account and delete your stories.
- You can accidentally delete your stories or images.
- Someone at Medium can make a mistake and delete them, too.
- Years or decades from now, Medium might cease to exist.
- Request your Medium archive from the bottom of https://medium.com/me/settings (Export content).
- Wait for the email.
- Download the archive from the email.
- Unpack it somewhere.
- Go to the
posts/
subdirectory of that archive and runmedium-export-image-fill.py
there (using terminal/command line).
Note: You can interrupt the script at any time and run it again – it should start where it left off.
- The script downloads the images in highest quality. (Owing to how Medium image server works, those won’t be the exact original image files you uploaded, but they should be in the same resolution. This is particularly important for animated GIFs.)
- Images are downloaded into
images/
subdirectory. - The original versions of modified archive files are saved in
original_articles/
, just in case.
Does this work on Windows?
Not sure. I wrote/tested it on Mac OS only. If you run it on Windows (successfully or not), please let me know.
How about Linux?
Some reported it worked for them properly on Ubuntu, FreeBSD, and Debian.
This script is in public domain. Run free.
1.01 (29 April 2018)
- Make it work with Python 3
1.00 (8 May 2017)
- Initial release