from socket import timeout
try:
    response = urllib.request.urlopen(url, timeout=10).read().decode('utf-8')
except (HTTPError, URLError) as error:
    logging.error('Data of %s not retrieved because %s\nURL: %s', name,
        error, url)
except timeout:
    pass
Как справиться с тайм-аутом urllib в Python 3?