I am writing a selenium script by python, but I think I don\'t see any information about:
How to get http status code from selenium Python code.
I used the following trick by using requests to make sure that server is responding first. Then I used driver:
resp = requests.get(link) while resp.status_code != 200: resp = requests.get(link) if resp.status_code == 200: break html = driver.page_source soup = BeautifulSoup(html)