I am trying to download a URL using python-wget downloaded from : https://pypi.python.org/pypi/wget
This package does not support a timeout option, hence it takes some time (around 10seconds) roughly for a query to fail. Is it possible to add a timeout in our try block to lessen the wait time for a function.
Something like this:
try(timeout=5s):
wget.download(URL)
except:
print "Query timed out"