File size: 1,303 Bytes
93f6e86
 
 
 
 
 
28be0f0
93f6e86
 
 
28be0f0
 
587887a
28be0f0
587887a
1c379d4
28be0f0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
587887a
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
title: Cfull
emoji: ๐ŸŒ
colorFrom: purple
colorTo: blue
sdk: docker
app_port: 7860
pinned: false
---

# Cfull

Runs [browserless](https://github.com/browserless/browserless) โ€” the open-source headless browser for AI agents and web scraping โ€” on Hugging Face Spaces.

A transparent TCP proxy on port 7860 handles HF health checks (`/`, `/health`) and forwards WebSocket + CDP traffic to browserless on port 9222.

## Usage

Connect with Puppeteer:
```js
import puppeteer from 'puppeteer-core';

const browser = await puppeteer.connect({
  browserWSEndpoint: 'wss://xocen-cfull.hf.space/devtools/browser',
});
const page = await browser.newPage();
await page.goto('https://example.com');
console.log(await page.title());
await browser.disconnect();
```

Or with Playwright:
```js
import { chromium } from 'playwright-core';

const browser = await chromium.connectOverCDP({
  endpointURL: 'wss://xocen-cfull.hf.space',
});
const page = await browser.newContext().then(ctx => ctx.newPage());
await page.goto('https://example.com');
console.log(await page.title());
await browser.close();
```

## CDP Endpoint

`wss://xocen-cfull.hf.space/devtools/browser`

## Source

- [browserless repo](https://github.com/browserless/browserless)
- [Docker Hub](https://hub.docker.com/r/browserless/browserless)