ProtocolsBrowserControl a browser directly in your Scrapybara instance with PlaywrightPythonTypeScript1Start an instance1from scrapybara import Scrapybara23client = Scrapybara(api_key="your_api_key")4instance = client.start(instance_type="small")2Start a browser session1cdp_url = instance.browser.start().cdp_url3Authenticate the session (optional)To save the authenticated state of a browser session, use the saveAuth method.1auth_state_id = instance.browser.save_auth(name="default").auth_state_idNow, you can reuse the saved auth state on other instances by passing the auth_state_id to the authenticate method. The browser needs to be started first.1instance.browser.authenticate(auth_state_id=auth_state_id)4Connect to the browser1from playwright.sync_api import sync_playwright23playwright = sync_playwright().start()4browser = playwright.chromium.connect_over_cdp(cdp_url)5Interact with the browser1page = browser.new_page()2page.goto("https://scrapybara.com")3screenshot = page.screenshot()6Stop the browser session1instance.browser.stop()Built with