diff --git a/ckanext/fso/harvesters/check_for_404s.py b/ckanext/fso/harvesters/check_for_404s.py index 0730ffd..f4e1ced 100644 --- a/ckanext/fso/harvesters/check_for_404s.py +++ b/ckanext/fso/harvesters/check_for_404s.py @@ -16,7 +16,7 @@ resource = dataset.find('resource') url = resource.find('url').text - request = http.request('GET', url) - if request.status != 200: - output_file.write(str(request.status) + ': ' + url + '\n') - print str(request.status) + ': ' + url + status = urllib3.PoolManager().request('HEAD', url).status + if status != 200: + output_file.write(str(status) + ': ' + url + '\n') + print str(status) + ': ' + url