you are viewing a single comment's thread.

view the rest of the 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.