How can I get the http status code in python if I open a link? I did it this way, but it always shows 200 even if the page throws a 404 error...
from urllib.request import *
self.driver.get(link)
code = urlopen(link).getcode()
if not code == 200:
print('http status: ' + str(code))