可以直接使用Playwright 提供的 API 手动实现 --save-storage 的功能
存储
context.storage_state(path="storage.json"
调用
context = browser.new_context(storage_state="storage.json)")
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/70042694/viewspace-3054771/ ,如需转载,请注明出处,否则将追究法律责任。