0

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

0

1 Answer 1

1
import httplib c = httplib.HTTPConnection('www.stackoverflow.com') c.request("HEAD", '') if c.getresponse().status == 301: print('Good news. Website is valid') 
Sign up to request clarification or add additional context in comments.

2 Comments

make sure to install httplib
your comment is unrelated.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.