@ogulcancelik/pi-web-browse 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/cdp.js +1 -11
  2. package/package.json +5 -4
package/lib/cdp.js CHANGED
@@ -92,20 +92,10 @@ export async function startBrowserForCdp(preferredPort, profileDir, browserBin =
92
92
  // OS-specific headless flags
93
93
  let headlessArgs;
94
94
  if (IS_MACOS || IS_WINDOWS) {
95
- // macOS and Windows: use standard headless mode.
96
- // --headless=new injects "HeadlessChrome" into the UA string which is
97
- // trivially detected by Google (results in /sorry/ CAPTCHA). Override
98
- // the UA to look like a normal browser.
99
- // On Linux this isn't needed: --ozone-platform=headless runs a full
100
- // browser with a normal UA (no "Headless" marker).
101
- const uaPlatform = IS_MACOS
102
- ? "(Macintosh; Intel Mac OS X 10_15_7)"
103
- : "(Windows NT 10.0; Win64; x64)";
104
- const HEADLESS_UA = `Mozilla/5.0 ${uaPlatform} AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36`;
95
+ // macOS and Windows: use standard headless mode
105
96
  headlessArgs = [
106
97
  "--headless=new",
107
98
  "--window-size=1280,720",
108
- `--user-agent=${HEADLESS_UA}`,
109
99
  ];
110
100
  } else {
111
101
  // Linux: use ozone headless platform (Wayland/X11 independent)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ogulcancelik/pi-web-browse",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Web search and content extraction skill for pi-coding-agent. Search the web and fetch pages via a real headless browser (CDP). Works on Linux, macOS, and Windows.",
5
5
  "type": "module",
6
6
  "main": "web-browse.js",
@@ -25,12 +25,13 @@
25
25
  "license": "MIT",
26
26
  "repository": {
27
27
  "type": "git",
28
- "url": "git+https://github.com/ogulcancelik/pi-web-browse.git"
28
+ "url": "git+https://github.com/ogulcancelik/pi-extensions.git",
29
+ "directory": "packages/pi-web-browse"
29
30
  },
30
31
  "bugs": {
31
- "url": "https://github.com/ogulcancelik/pi-web-browse/issues"
32
+ "url": "https://github.com/ogulcancelik/pi-extensions/issues"
32
33
  },
33
- "homepage": "https://github.com/ogulcancelik/pi-web-browse#readme",
34
+ "homepage": "https://github.com/ogulcancelik/pi-extensions/tree/main/packages/pi-web-browse#readme",
34
35
  "engines": {
35
36
  "node": ">=18.0.0"
36
37
  },