More exception handling
HTTPError is a subclass of URLError, so replace with URLError where necessary.
Add socket errors (why the hell does urlopen raise this?)