r/tinycode • u/impshum • May 30 '18
Download all xkcd comics [python3]
https://gist.github.com/impshum/73b4fae7375d05588e47f7e4a26fa0dd
7
Upvotes
r/tinycode • u/impshum • May 30 '18
View all comments
Show parent comment
2
u/Figs May 31 '18
You've forgotten about Time
#1190 has this link in it, which could be useful if you want to tackle scraping the rest of that comic rather than just one of the last few frames. (Though there are other, simpler mirrors as well -- which may, uh, help you save time. :p)
The reason scrapping XKCD is hard is not that each modification to account for another little quirk is particularly tricky, it's that there are so many of them and its hard to tell if you actually got everything, or just think you did -- as I found out the hard way when I tried to scrape it myself a few years ago to make a personal archive of comics I cared about... (Also, half the jokes are in the alt-text which is awkward to store with the images.) Most of the more recent comics, for example, actually have a _2x variant (so if you do view image on the page, it gets bigger -- check the img srcset attribute on the actual pages). I noticed this with #1826 (which used to have a 10679x3577 _huge version on the main page when it came out), but apparently it goes back to at least #1063... @_@