I'm looking for the fastest method to retrieve whether or not an URL exists. I'd like to do the test on a list of URLs.
Thanks for your help
I'm looking for the fastest method to retrieve whether or not an URL exists. I'd like to do the test on a list of URLs.
Thanks for your help
import httplib
c = httplib.HTTPConnection('www.stackoverflow.com')
c.request("HEAD", '')
if c.getresponse().status == 301:
print('Good news. Website is valid')