Skip to content
Discussion options

You must be logged in to vote

As Google says, you would use the requests library to get the response code before using Selenium on the page:

>>> import requests
>>> response = requests.head("https://example.com")
>>> response.status_code
200

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@mdmintz
Comment options

@heavenyoung1
Comment options

@heavenyoung1
Comment options

@mdmintz
Comment options

@heavenyoung1
Comment options

Answer selected by mdmintz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants