phantom+express
var express = require( 'express' ); var router = express.Router(); var phantom = require( 'phantom' ); var web2img = (url, res, dataType, width, height) => { phantom.create().then( function (ph) { ph.createPage().then((page) => { var settings = { // operation: "POST", encoding: "utf8" }; page.open(url, settings).then((status) => { console .log(status); var fmt = 'JPEG' ; if (status == 'success' ) { page.property( 'viewportSize' , {width: width || 540 , height: height || 960 }); page.renderBase64(fmt).then((data) => { if (dataType == 0 ) { res.json({code: 1 , data: "data:image/png;base64," +