Puppeteer!

Turns out you can run Puppeteer from within a browser! Puppeteer is a programatically controlled Chrome web browser.

This is very useful for web crawlers, data collection and testing websites. I hope it will be quite useful to many people from data scientists to software engineers. I think the Observable team use puppeteer to generate our preview images. It’s really useful.

This notebook works works by forming a websocket connection to the Chrome dev tools instance running remotely. So the actual browser is running in the cloud but you can read and write to it using code in Observable. Pretty cool!

Check it out Puppeteer / Endpoint Services / Observable

4 Likes

BTW I migrated this to login-with-comment so you can now login and run the examples without any additional dependencies.

1 Like