def valid_download(url): return bool(validators.url(url)) and int(httplib2.Http().request(url, 'HEAD')[0]['status']) < 400