简要描述:
根据网页html代码,使用webkit内容渲染,生成网页快照图片,接口文档说明如下。DEMO应用地址:/htmltoimg.html
请求URL:
/home/Htmltoimg/api
请求方式:
POST
参数:
请求文章示例
网页地址:/yangzailu/p/7884148.html
返回示例 (由于字符太长,imgbase64参数已简化去除部分内容
)
{"code": "1","data": {"imgbase64": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAZABkAAD/2wBDAAIBAQIBAQICAgICAgICAwUDAwMDAwYEBAMFBwYHBwcGBwcICQsJCAgKCAcHCg0KCgsMDAwMBwkODw0MDgsMDAz/2wBDAQICAgMDAwYDAwYMCAcIDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAz/vDlpdeMdKt4PBPiKLRfFOvXGoQXDNr9018Jbq9a4lED22nR7o/3igRuUiZ5GD6/XJdEnp0d9dXbT07feda4iqNt06amuW65Zc15WqSsmk73ULbXTeiktvovT/iHZal8TtX8JxxXQ1HRdLsdWnkZV8h4ruW8ijVTncWDWUpYFQAGTBOSF5f4sftY/D74IeP8ARfDPinxVoOh6rrcEl4qX+p21mlraoCPtErTSIArSARIq7ndixVCkUzx/NXh79mTzv2nPF9j/AMM7/s6S/ZvC+hz/ANnSaliytfMu9YXz4z/YpzI=","url": "/yangzailu/p/7884148.html"}}
返回参数说明
备注
当code返回结题为0的时候,结果会返回一个msg参数:
{"code": "0","msg": "错误提示"}