이미지캡쳐
-
파이썬 이미지캡쳐 모듈 (Html2Image)IT/파이썬 2021. 11. 13. 17:21
from flask import Flask, send_from_directory, send_file from html2image import Html2Image app = Flask(__name__) @app.route("/") def hello_world(): url = 'https://www.python.org' width = 1200 height = 1024 filename = 'download_img.png' hti = Html2Image() # 다음처럼 저장경로도 수정가능함 # path = "C:\\ProgramData\\" # hti = Html2Image(output_path=path) hti.screenshot(url=url, save_as=filename, size=(width, heig..