还是使用本地chrome吧,省得下载几百兆内容
This commit is contained in:
@@ -68,6 +68,7 @@ def html_to_image(html_file, output_image):
|
||||
:param output_image: 输出的图片文件路径
|
||||
"""
|
||||
with sync_playwright() as p:
|
||||
# TODO 这里使用的比较呆的固定路径,后期优化
|
||||
browser = p.chromium.launch(executable_path=r"C:\Users\Liu_WIN10\AppData\Local\Google\Chrome\Application\chrome.exe")
|
||||
page = browser.new_page()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user