I am looking to embed(stream) a web browser running from my vps on a webpage. I'm just wondering what the best way to do that would be. preferably using a python framework, But I'm just not sure where to start. I'm open to any suggestions, thanks!
Asked
Active
Viewed 1,015 times
0
-
How about a text box where you enter a URL. Use the 'requests' module to fetch the html from your vps and then return the html to the page in a different frame. It's just really basic proxy. This method will likely not work if the page you're loading makes asynchronous calls back to the server. – MS-DDOS Apr 10 '16 at 02:04
-
Yea thanks, that is a really good idea, but what would happen if the person wanted to click on a link or tab on the webpage, Do you think there would be someway to fetch the html everytime somebody were to click on a link that would take them to another URL? – Cristian Apr 10 '16 at 06:43
1 Answers
0
What you're looking for is likely a python proxy server. Fortunately other people have also been interested in such a thing. Take a look at this stack overflow article, as it has a number of suggestions on simple python based proxies you may want to try.
-
Thanks, this helps a ton!! Just out of curiosity, do you think python would be the best language for this? – Cristian Apr 11 '16 at 06:10
-
Python will certainly work. But in all honesty, there are tools that are more purpose built for this task. Your best bet is probably just to use NGINX configured as a reverse proxy. [Here is an article describing the basic configuration of an NGINX reverse proxy](https://www.nginx.com/resources/admin-guide/reverse-proxy/). – MS-DDOS Apr 12 '16 at 01:37