from time import sleep
sleep(5)
html = driver.execute_script(
    "return document.getElementsByTagName('html')[0].innerHTML")
print(html)
How to get html with javascript rendered sourcecode by using selenium