Skip to content

[Bug]: From 1.57.x version the patchright driver is not installed #95

@lestarcdog

Description

@lestarcdog

Checklist before reporting

  • I have searched for similar issues and didn't find a duplicate.
  • I have updated to the latest version of Patchright to verify the issue still exists.
  • I have verified that this issue does not occur when using Playwright directly.

Patchright Version

1.57.x

Operating System

Tested on windows

Bug Description

The patchright/driver folder contains the vanilly playwright driver from 1.57.x version and not the patchright core driver. This issue doesn't happen with previous versions. I've tested it with 1.56.0 and it is works as expected.

For example the patched chromium switches are not there after pip install:
../site-packages/patchright/driver/package/lib/server/chromium/chromiumSwitches.js

I think the issue is that the driver's URL has changed in upstream from https://playwright.azureedge.net/builds/driver/ to https://cdn.playwright.dev/builds/driver/

in microsoft/playwright-python@3d1b875#diff-60f61ab7a8d1910d86d9fda2261620314edcae5894d5aaa236b821c7256badd7

and in patchright script it is expected to match the previous URL:
https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-python/blob/main/patch_python_package.py#L53

Thank you

Test file (self-contained)

# pip install patchright==1.57.2
# patchright install chromium

# patchright here!
import time

from patchright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch(
        headless=False,
    )
    page = browser.new_page()
    page.goto("https://www.browserscan.net/")
    time.sleep(500)
    browser.close()

Expected Behavior

The patchright driver is used.
(https://www.browserscan.net/ detects patchright as a bot

Actual Behavior

The patchright driver is not used.
See bug description

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingunconfirmeda bug which hasn't been reproduced yet

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions