I want to replace web-request with html file. Link to the file html code https://pastebin.com/BJbgXtg0
My code
from selenium import webdriver
file_path = "Mark.html"
with open(file_path) as html_file:
driver = webdriver.Chrome()
html_content = html_file.read()
print(html_content) # prints full file -- OK
print("--------------------")
driver.get("data:text/html;charset=utf-8,{}".format(html_content))
print(driver.page_source) # prints only part of the file --- PROBLEM
print("---------------------------")
edu_raw = driver.find_elements_by_xpath("//div[@id='education']/div/div/div")
print(edu_raw)
Problem is that print(driver.page_source)
prints only part of the file
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Mark Zuckerberg</title><meta name="referrer" content="origin-when-crossorigin" id="meta_referrer"><style type="text/css" nonce="92Mfjw08">/*<![CDATA[*/.bi .bk .cd{color:</style></head><body></body></html>
How can print whole file?