DEV Community

Discussion on: Web Scraping — Scrape data from your instagram page with Nodejs, Playwright and Firebase.

spidydev profile image

go to your project directory
using the terminal,run the command below,
npx playwright open --save-storage websitename.json

a browser will open,now navigate to the website and sign-in/solve captcha,
then close browser. You will notice that a file "websitename.json" has been created.

now in playwright,set you browser context using this code below

const context = await browser.newContext({
storageState: "websitename.json"

you are now automatically logged in. :)