wise-white
wise-white•2y ago

How to speed up playwright?

Hello, I'm exploring ways to optimize web crawling speed using Playwright. I'm curious if there's a method to navigate to new URLs without closing and reopening pages each time. Essentially, updating the URL in the address bar and initiating navigation. Additionally, is there a way to disable the rendering of images, fonts, and stylesheets, assuming I only need access to the DOM? Any insights or tips would be greatly appreciated!
3 Replies
sensitive-blue
sensitive-blue•2y ago
Hi, I'm afraid you can't re-use pages with the existing PlaywrightCrawler. I had a similar problem in this previous post, where I finally wrote my own crawler (I shared my code)
Discord
Discord - A New Way to Chat with Friends & Communities
Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.
sensitive-blue
sensitive-blue•2y ago
About disabling rendering, have you tried blockRequests ?
MEE6
MEE6•2y ago
@Marc Plouhinec just advanced to level 2! Thanks for your contributions! 🎉

Did you find this page helpful?