running headless chrome in an microsoft azure web app

荒凉一梦 提交于 2019-12-23 23:10:43

问题


I am currently using phantomjs to generate screenshots of web pages. Due to various issues including web fonts, and video tag support, I would like to try switching to headless chrome.

Has anyone had success running headless chrome in an azure web app? I cannot find a .net api, and assume I need to run node.js with puppeteer If I want a javascript api similar to phantomjs.


回答1:


Right now most of the big libraries are made for NodeJS. It's possible to run Chrome headless without it, but you'll need a library for your .NET API to effectively communicate with Chrome. If none exist, then the protocol itself is documented here, and you could build one for .NET.

If you're struggling to get Chrome running on Azure I have a service that offers Docker images, which could be as simple as a few commands to have up and running (located here). Other than that there's a few open-source options out there, but they have differing issues and uses-cases.



来源:https://stackoverflow.com/questions/47265315/running-headless-chrome-in-an-microsoft-azure-web-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!