python3将网页转换为PDF或者图片的方式

python3将网站转换为PDF需要用到pdfkit模块,这个模块需要我们进行安装pip install pdfkit然后我们百度下得到一段生成PDF的代码,我测试的是把我博客首页生成PDF#!/usr/bin/python3#coding:utf-8import requestsimport pdfkitresponse = requests.get("https://sulao.cn/")htmls = response.con...

阅读全文