Author Topic: Python script to download all xkcds  (Read 10053 times)

0 Members and 2 Guests are viewing this topic.

Offline TC01

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 344
  • Rating: +9/-0
    • View Profile
Re: Python script to download all xkcds
« Reply #15 on: February 06, 2011, 12:34:17 pm »
I've released a 1.1 update to this library (and replaced the attachment in the first post).

The only change this makes: it now uses xkcd's built-in JSON interface rather than the RSS feed to get the latest comic number. This is good for two reasons:

1. It removes the third-party dependency (you now only need Python 2.x)
2. It stops the script from breaking when the RSS contains things other than comics in it (as it occasionally does).



The userbars in my sig are links embedded links.

And in addition to calculator (and Python!) stuff, I mod Civilization 4 (frequently with Python).

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Python script to download all xkcds
« Reply #16 on: February 07, 2011, 11:45:22 pm »
Cool to hear. Is it less intensive on their server, too? Also by different stuff do you mean for example XKCD #404?
« Last Edit: February 07, 2011, 11:45:41 pm by DJ Omnimaga »

Offline TC01

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 344
  • Rating: +9/-0
    • View Profile
Re: Python script to download all xkcds
« Reply #17 on: February 09, 2011, 04:37:44 pm »
Cool to hear. Is it less intensive on their server, too? Also by different stuff do you mean for example XKCD #404?

Well, I'm not sure how more/less intensive it is on their server. I don't know how more or less intensive it is to access JSON or an RSS feed.

As for "different stuff"- no, not like 404, but sometimes they post information about their site store or other miscellaneous news in the RSS as opposed to new comics.




The userbars in my sig are links embedded links.

And in addition to calculator (and Python!) stuff, I mod Civilization 4 (frequently with Python).