Download all xkcd comics in one go…specially for xkcd fans

Long time no blogging and again now with a new piece of code just for xkcd fans.. I am a big fan of it and love reading it when I get bored. This sunday I thought how good it would be to have all the comics on my hard drive however I had one little problem that is there were around 700 comics in all together and I had no patience to get them by right clicking it. So I decided to write a small snippit for it too and put it on my blog.

The pages in xkcd are in the format of http://xkcd/<some number>/. What I did was navigate through all the pages and extracted the link of the image using a simple regex. After extracting the hotlinks of the images, I downloaded them to a folder.

Get the code from here

Now compile the code using javac and run it using java. Please note that all the images would be stored in the directory in which the compiled script lies and yes make sure you have got a working internet connection. Once you start it sit back and relax.

My script with a little modification can be applied to a lot of other sites too like onemanga etc

Disclaimer : I dont know whether it is legal or illegal so if anyone has any objection towards my script please leave a comment saying so and citing proper references


4 thoughts on “Download all xkcd comics in one go…specially for xkcd fans

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.