How to run PhantomJS as a server and call it remotely?

前端 未结 2 974
离开以前
离开以前 2020-12-29 15:55

This is probably a very basic question. I would like to run a headless browser PhantomJS as a server but not as a command line tool.

Once it is running

2条回答
  •  长情又很酷
    2020-12-29 16:30

    The easiest way is to make a python script or something simple to start the server and use python websockets to communicate with it, using a web form of sorts to query for a website and get the page source. Any automation can be done via cron jobs, or if you are on Windows, you may use the Tasks feature to autostart the python script.

提交回复
热议问题