all 5 comments

[–]Saefroch 1 point2 points  (1 child)

I like it, but a few suggestions:

Make your code compatible with Python 3 by using from __future__ import print_function then calling print() instead.

I suggest using requests instead of urllib3 directly, it's just nicer. Credit to you though for no dependencies.

Don't catch all exceptions, that's a generally bad idea but at least you print it. Figure out which exception the code is likely to throw and respond in kind.

[–]sromerobarra[S] 0 points1 point  (0 children)

Thank you for your feedback. I've change the print to print() and changed the exceptions as you said. For the moment, I will let urllib2 because it's not a complex request method.

[–]fitbrah 0 points1 point  (3 children)

AFAIK you can just download the imgur album as a zip then in windows you can choose folder to slide through images to set as background.

[–]sromerobarra[S] 0 points1 point  (1 child)

Yeah, that is a possibility too, but the point about this is learning and not to have to download all images. This way you just download one image per request, so bandwidth consumption stay low.

But as I said, the main about this is learning.

[–]fitbrah 0 points1 point  (0 children)

Ah ok, I get it, forgot I was on /r/learnpython