user2320239 user2320239 - 1 year ago 65
Python Question

Open a url response in the browser

I'm writing a script that makes a post request to a url, I'd then like to open the response page in the browser of the system. I'm having trouble finding out how.

Answer Source

You could save the content to a local file and use webbrowser.open_new("file://yourlocalfile.html") but this has one major flaw:

Because of the browsers same origin policy this site could not load any external js, css or pictures.