dangerous-fuchsiaD

ERR_CONNECTION_REFUSED on a headful scraper

Sample Code:
async with async_playwright() as playwright:
    browser = await playwright.chromium.launch(headless=False)
    context = await browser.new_context(
        user_agent=user_agent_strings[random.randint(0, 3)],
        viewport={"width": 1920, "height": 1080},
    )
    page = await context.new_page()
    try:
        await page.goto("https://ca.indeed.com/")
    // playwright._impl._api_types.Error: net::ERR_CONNECTION_REFUSED at https://ca.indeed.com

Do I have to use a paid proxy? This runs fine locally btw
Was this page helpful?