REAPI/extend/python/Screenshot.py
mzeros 84856367e9 feat(openapi): 新增码速达API接口
- 添加AfterSales类处理售后服务相关接口
- 新增ContentTemplate控制器和模型用于内容模板管理
- 添加diandian渠道服务类
- 更新Feedov控制器和添加FeedovHfAuto命令类
- 新增autoCard视图用于自动发卡设置
2025-03-11 00:17:40 +08:00

21 lines
419 B
Python

from selenium import webdriver
import sys
if len(sys.argv) != 3:
print("Usage: python screenshot.py <url> <output_file>")
sys.exit(1)
url = sys.argv[1]
output_file = sys.argv[2]
# 设置无头模式
options = webdriver.ChromeOptions()
options.add_argument('headless')
# 启动浏览器并打开网页
driver = webdriver.Chrome(options=options)
driver.get(url)
# 截图并保存
driver.save_screenshot(output_file)
driver.quit()