XKCD Download Script in Python

I have spent the last few hours learning the basics of python all over again whilst writing an script to download all the comics from 1 through to the Most recent one.

When searching the web, I found the only solutions people had come up with were either batches of images up to only a certain number in a zip, or a very cumbersome way of attempting to download all the images.

The solution I have come up with gives you a python file that you can . It always gets from 1 through to the current comic and stores them in a directory it creates called XKCD_IMAGES.

To use the file (on linux or mac), simply:

  1. source
  2. download the source to where you would like the images to be stored
  3. open your terminal
  4. change the directory to where the python file is stored
  5. run the command "python xkcd.py"
  6. wait whilst it downloads all the images

Future modifications to be made:download

Benjamin Kaiser

Benjamin Kaiser

Software Engineer working on the SharePoint team at Microsoft. I'm passionate about open source, slurpess, and Jesus.
Gold Coast, Australia

Post Comments