0

I'm trying to control the adspower anti-detect browser's API with playwright.

import requests
from playwright.sync_api import sync_playwright

ads_id='kkvlbud'
response = requests.get("http://local.adspower.com:50325/api/v1/browser/start?user_id=" + ads_id).json()
ws_url = response['data']['ws']['puppeteer']

with sync_playwright() as p:
    browser = p.chromium.connect_over_cdp(ws_url)
    page = browser.new_page()
    page.goto('google.com')

Error: It looks like you are using Playwright Sync API inside the asyncio loop. Please use the Async API instead.

1

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.