user2320239 user2320239 -5 years ago 184
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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download