Use urllib2 instead of urllib. Set a 20 seconds timeout in case of bad connexion.