I need to retrive html using chrome dev tools protocol but I have sum problem and the behaviour is not how expected
I'm using https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getOuterHTML and PyChromeDevTools for manage chrome page
from terminal
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
python script
import PyChromeDevTools
chrome = PyChromeDevTools.ChromeInterface(host='localhost',port=9222)
chrome.Network.enable()
chrome.Page.enable()
chrome.Page.navigate(url="https://stackoverflow.com")
html_code=chrome.DOM.getOuterHTML()
print(html_code)
I'm not sure that DOM.getOuterHTML its the correct command but seems good for the purpose