Answer the question
In order to leave comments, you need to log in
Playwright: how to disable image loading and css?
To speed up the loading of pages, I want to disable the loading of photos and styles, but I did not find how to do this on playwright. Can you please tell me how this can be implemented? It will be great if in python) I understand that regardless of the PL, the essence is the same, but for some reason my brain stubbornly refuses to interpret the js syntax
Answer the question
In order to leave comments, you need to log in
Eh, I wrote another question from the category of "badly googled."
context.route("**/*", lambda route: route.abort()
if route.request.resource_type == "image"
or route.request.resource_type == "stylesheet"
or route.request.resource_type == "svg"
else route.continue_())
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question