Romance,Sarcasm,Math and Language
A Python 3 script to download xkcd comics. xkcd Downloader is a very simple Python script I developed to kill time. Built on Python 3 it only depends on standard Python installation modules i.e.urllib
,random
and os
- Download this repository and extract it.
- Place the file
xkcd.py
in the Python installation directory on your drive. - Double-click to execute or do it through the command line with the command
python xkcd.py
. - You will be greeted with a little introduction and help.
- Give the required input to download the comics in
.jpg
format. - You will also be prompted to specify a file path for downloading the comic(s).
- If no directory is specified, the comics will be downloaded to the directory of the script
- The comic(s) will be downloaded in the same directory as the script with their respective titles
- Enjoy !
- Python 3
Input | Action | Example |
---|---|---|
all | downloads all xkcd comics from the beginning to the latest one | all |
first | downloads the first xkcd comic | first |
latest | downloads the latest xkcd comic | latest |
random | downloads a random xkcd comic | random |
[Any number] | downloads the xkcd comic of that number | 67 |
[Range] | downloads the xkcd comics in that range | 5-19 |
[Default] | downloads the latest xkcd comic by default |
|
All Rights Reserved by Randall Munroe and http://www.xkcd.com