I am trying to disable the top bar in "https://www.msn.com/de-de/wetter/vorhersage" with python and selenium. This is what I am doing:
element = driver.find_element("id", "header")
driver.execute_script("""
var element = arguments[0];
element.parentNode.removeChild(element);
""", element)
It unfortunately just blanks the content of the top bar. The white frame itself stays. Can someone help me to get just the the site without the top bar itself?
This is what I have tried:
element = driver.find_element("id", "header")
driver.execute_script("""
var element = arguments[0];
element.parentNode.removeChild(element);
""", element)