Closed SansLang closed 3 years ago
https://playwright.dev/python/docs/network/#abort-requests
You can use route (prefferrably on context) to not load images.
https://playwright.dev/python/docs/network/#abort-requests
You can use route (prefferrably on context) to not load images.
thanks for your reply.but if I set abort all image request in context then loading page with launch browser headful,the page broken because can not load something must, cause I can not get page object
https://playwright.dev/python/docs/network/#abort-requests
您可以使用路由(最好在上下文中)不加载图像。
Thanks for your reply again,and I find other way to achieve this by launch browser with args,the args are ["--blink-settings=imagesEnabled=false"]
I'm creating a class for Browser and calling:
Browser.running_context = chromium.launch(headless=False, timeout=160_000, args=["--blink-settings=imagesEnabled=false"])
in selenium, I dont need page image full loading and I can use option.add_argument('blink-settings=imagesEnabled=false'). now in playwright I want achieve the same effect,but the playwright documentation not mention about this ,how can I do for this,thank you