Fork from https://bitbucket.org/techtonik/python-wget/src